Hello everybody ,
I did some calculation in a loop and this is the output I need to put the value after each iteration in Nx1 matrix how can I do this?
Follow this example for n=6 loops where I store your sumOfValues1 in a n-by-1 vector. Also, take some time to read through this document so you understand how indexing works.
% initialize variable n = 6; a = zeros(n,1);
% Loop through and store result for i = 1:n a(i) = sumOfValues1; end