MATLAB function that is equivalent to Maple's match function?

I'm looking for at function that is equivalent to Maple's match function:
The match function returns true, because the LHS and the RHS of the equation can be matched for all s. The return variable m contains the values of the unknowns, A and B, that solve the equation for all s.
Does MATLAB offer a function similar to Maple's match function?

回答 (1 件)

KSSV
KSSV 2020 年 2 月 26 日
編集済み: KSSV 2020 年 2 月 26 日

0 投票

syms s ;
A = 1; B = -1;
LHS = 1/s-1/(s+1) ;
RHS = A/s+B/(s+1) ;
m = isequal(LHS,RHS) ;

3 件のコメント

Henning Søgaard
Henning Søgaard 2020 年 2 月 26 日
Thanks, but A and B are to be regarded as unknowns that should be solved for. That is, the values of A and B are not input for the problem - they are output to be obtained by solving the equation for all s.
KSSV
KSSV 2020 年 2 月 26 日
Okay,...it is like partial fractions?
Henning Søgaard
Henning Søgaard 2020 年 2 月 26 日
Well, for the example above I could apply partial fractions. However, I would like to be able to match expressions in more general terms. Here is another example where I want to find a particular solution for a differential equation by using the method of undetermined coefficients.

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

カテゴリ

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

タグ

質問済み:

2020 年 2 月 26 日

コメント済み:

2020 年 2 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by