How can i create a for loop that will give me seperate column vectors. I have a row vector, which i want to be the end values of the column vectors. Due to the data being loaded there will be varying values in the row vector and this is why i have used the command to determine c. I have defined the variable xstart to be a row vector containing just 0's for the same amount of columns as xend has. Therefore i have starting and finished values. I need to get the output of the for loop to be x1=[], x2=[], ... , xc=[]
So far my script looks like:
x=input('define independant variable (put in ''):');
y=input('define variable to be smoothed (put in ''):');
%These two lines as user to define the variables x and y based on the %data they have in their workspace
[r,c]=size(x);
%determines how many rows (r) and columns (c) are in matrix x
xend=x(end,:);
%creates a vector which contains only the final row in matrix x (this %should be the final time recording for the viable cell count)
xstart=zeros(1,c);
for n=1:c;
*xn=(xstart(1,n):0.5:xend(1,n))';*
end
Thank you