Assign variables to positions in matrix
古いコメントを表示
I'm sure this is a stupid question, but how does one define variables as positions in a matrix? For example, in matrix algebra, if I set up a matrix equation such that B=inv(A)*C, how can I define x and y such that B=[x;y]?
採用された回答
その他の回答 (1 件)
Sean de Wolski
2011 年 3 月 25 日
B = [3;4]; %column vector
B = [3 4]; %row vector
B = [1 2; 3 4]; %2x2 matrix.
Ps
B = A\C; %is better than inv(A)*C
2 件のコメント
Patrick Star
2011 年 3 月 31 日
Sean de Wolski
2011 年 3 月 31 日
Note the difference in our slashes \/!
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!