how can a loop be done?

I have a Matrix X for example X=rand(100) then I would like to take one column each time and then add another one and each time add one more until all the columns become the original matrix

Réponses (1)

Andrei Bobrov
Andrei Bobrov le 2 Sep 2011

0 votes

for j1 = 1:size(X,2)
newMatrix = X(:,1:j1);
% result = fun(newMatrix)
end

Cette question est clôturée.

Question posée :

le 2 Sep 2011

Clôturé :

le 20 Août 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by