How to save a column into separate variables
3 ビュー (過去 30 日間)
古いコメントを表示
Fernando Pérez Lara
2018 年 10 月 18 日
コメント済み: Fernando Pérez Lara
2018 年 10 月 18 日
Hi, I want to save a column of a matriz into five variables, here is my code:
A = [1 0 0 0 -3 0;
0 1 0 0 -1 0;
0 0 1 0 -1 0;
0 0 0 1 -3 0];
I want to have into a, b, c, d and e the fifth column. Something like this:
a = 3
b = 1
c = 1
d = 3
Thank you!
0 件のコメント
採用された回答
madhan ravi
2018 年 10 月 18 日
編集済み: madhan ravi
2018 年 10 月 18 日
A = [1 0 0 0 -3 0;
0 1 0 0 -1 0;
0 0 1 0 -1 0;
0 0 0 1 -3 0];
a=A(:,1)
b=A(:,2)
c=A(:,3)
d=A(:,4)
e=A(:,5)
4 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!