How to insert calculation values in to a zero matrix
显示 更早的评论
Dr is the result matrix (4 by 4) and I want to insert only the third non-zero column into a new matrix like Z.
Dr =
0 0 -0.0618 0
0 0 -0.0618 0
0 0 0.9884 0
0 0 0.9884 0
Z = [-0.0618;-0.0618;0.9884;0.9884]
I've been tried a lot of ways but none of them works. Therefore, any advises are very welcome. Thanks!
回答(1 个)
Alan Stevens
2020-8-28
Z = Dr(:,3)
should do it.
3 个评论
Benjamin Pu
2020-8-28
madhan ravi
2020-8-28
i suggest you to do the MATLAB Onramp Course.
Benjamin Pu
2020-8-28
类别
在 帮助中心 和 File Exchange 中查找有关 Mathematics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!