MATLAB: I need the best way to write the loop commands for loop for i=1:15, y(i+1)=vec(i); end y(1)=vec(16); Best Answer y = vec([16, 1:15]); Related SolutionsMATLAB: How can i write condition “x is not less then zero” in while loop while x >= 0 MATLAB: Best way to write to a structure No, just return something from the function.function TheStruct = processdata(TheStruct) ....endand call it asdata = processdata(data) Related QuestionConverting for loop to while loopWhats the best command to write to file inside parfor loop‘break’ in ‘while’ loopWhat’s the best way to shorten this
Best Answer