Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Simple Question: Taking Some Elements of Variables Based on Number
1 回表示 (過去 30 日間)
古いコメントを表示
Bx is an array. Size is 6x1.
When I want two rows of members from that, it gives me as it should. If I ask only one row, it gives as second one. Isn't that wrong? Am I doing something wrong? Since I have based my code to the first type, due to second type of output I got errors
K>> B_x([1 2;3 4])
ans =
-25 -24
-23 -22
K>> B_x([1 2])
ans =
-25
-24
2 件のコメント
Tommy
2020 年 4 月 24 日
When you call B_x([1 2]), even though the indices are a row vector, you get a column vector because B_x is a column vector.
回答 (0 件)
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!