Info
此问题已关闭。 请重新打开它进行编辑或回答。
How to Assign Values from a Struct to a Matrix in a For Loop?
1 次查看(过去 30 天)
显示 更早的评论
A.B.C = [1 2 3];
A.B.D = [3 4 5];
for k = 1:2
G(k, :) = A.B.C;
G(k, :) = A.B.D;
end
G
G returns:
3 4 5
3 4 5
Why doesn’t it return the following? What is the solution to have a G like the following?
1 2 3
3 4 5
0 个评论
回答(1 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!