Info

此问题已关闭。 请重新打开它进行编辑或回答。

how can a loop be done?

1 次查看(过去 30 天)
Niki
Niki 2011-9-2
关闭: MATLAB Answer Bot 2021-8-20
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

回答(1 个)

Andrei Bobrov
Andrei Bobrov 2011-9-2
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