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

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 件のコメント

Walter Roberson
Walter Roberson 2012 年 12 月 16 日
Something like coeffs() ?
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 件のコメント

Marco
Marco 2012 年 12 月 17 日
ok...but I need it to be automatic
Azzi Abdelmalek
Azzi Abdelmalek 2012 年 12 月 17 日
automatic ? how ?
Walter Roberson
Walter Roberson 2012 年 12 月 17 日
Marco wants to be able to input the symbolic expressions and have the matrices output.
Marco
Marco 2012 年 12 月 17 日
exactly!

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

質問済み:

2012 年 12 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by