Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

how can a loop be done?

1 visualizzazione (ultimi 30 giorni)
Niki
Niki il 2 Set 2011
Chiuso: MATLAB Answer Bot il 20 Ago 2021
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

Risposte (1)

Andrei Bobrov
Andrei Bobrov il 2 Set 2011
for j1 = 1:size(X,2)
newMatrix = X(:,1:j1);
% result = fun(newMatrix)
end

Community Treasure Hunt

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

Start Hunting!

Translated by