MATLAB: How to save for loop data into vector for loopvector Dear all, I have this simple code: for s = 0.0:0.1:1 disp(s) end I want to save data from this for loop into a vector. How can I do this? Thank you for answers. Best Answer v = 0:0.1:1 %?Or if you really want to be inefficient and use a loop: idx = 1; for s = 0:0.1:1 v(idx) = s; idx = idx + 1; end Related SolutionsMATLAB: How to find repeat element of vector for i=1 a=b(1:3:end); end MATLAB: Save save(['C:\' s],s) %save the mat file with the same name as the variable Related QuestionFind repeated vectors in matrixFinding the position of a row vector in an arrayHow to save a cell arrayVectorized method to find the number of consecutive 1s from the left of an arraySave pathRemove duplicate values, but keep the initialSave instruction
Best Answer