Build a matrix for each loop output
2 次查看(过去 30 天)
显示 更早的评论
Dear all
I would like to store each output from a loop to a matrix M.
I have some dificulties due to indexing.
Could someone plese give me a help on this problem?
Thank you very much
2 个评论
采纳的回答
Matt J
2022-3-6
M=zeros(3,4);
for j=1:3
As_prov=As.Asst>Asneg(j);
i=find(As_prov,1,'first')
M(j,1)=As.n1(i);
M(j,2)=As.dbL1(i);
M(j,3)=As.n2(i);
M(j,4)=As.dbL2(i);
end
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!