Creating a mtarix from results of a for loop that creates vectors
Show older comments
Hi
I very new to Matlab and i hoped that someone could help me. I have the following for loop
for I = R
i1 = find(I, 1, 'first');
i2 = find(I, 1, 'last');
I=I(i1:i2);
xq = 1:5;
I = interp1(I,xq);
disp(I)
end
R is nxm matrix. So basicallly i perform the functions in the loop to each column in the matrix R and this results in a vector I. What i would like is to create a new matrix, each column in the matrix must be each of the verctors I created in the loop. Could you please guide me as to how to do this
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!