How to save output of double loop as a matrix?

5 次查看(过去 30 天)
for i=1:m
for j=1:n
A=myfunction(...)
end
end
where the output A is the square matrix.
How to save output A for each iteration

采纳的回答

Star Strider
Star Strider 2021-9-19
Since ‘A’ is a matrix, save it as a cell array —
for i=1:m
for j=1:n
A{i,j} = myfunction(...)
end
end
.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by