Write some equations as product between function-matrix and constant-matrix

조회 수: 4 (최근 30일)
Marco
Marco 2012년 12월 16일
Hi,
Is there some matlab command to collect functions and constant as two matrices or a matrix and a vector respectively. In other words, for example, if I have this symbolic system of equations:
m*x^2 + n*y = z1
b*x + c*y^2 = z2
Is there a way to getout, automatically, the system as product
Z = X*k
where X is a matrix of only function terms, not constant, at most 0 and k is a matrix (or a vector) of (and only) constants such that:
Z = [z1; z2];
I don't mind size of X and k
  댓글 수: 2
Marco
Marco 2012년 12월 17일
편집: Marco 2012년 12월 17일
Yes! I'll try to make it to rearrange like matrix product
Thanks

댓글을 달려면 로그인하십시오.

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2012년 12월 17일
편집: Azzi Abdelmalek 2012년 12월 17일
K*X=Z
%with:
K=[0 m n 0;b 0 0 c]
X=[x;x^2;y;y^2]
Z=[z1;z2]
  댓글 수: 4
Walter Roberson
Walter Roberson 2012년 12월 17일
Marco wants to be able to input the symbolic expressions and have the matrices output.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by