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!