MATLAB Answers

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

조회 수: 8(최근 30일)
Henning Søgaard
Henning Søgaard 26 Feb 2020
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?

  댓글 수: 0

로그인 to comment.

답변(1개)

KSSV
KSSV 26 Feb 2020
편집: KSSV 26 Feb 2020
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 26 Feb 2020
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 26 Feb 2020
Okay,...it is like partial fractions?
Henning Søgaard
Henning Søgaard 26 Feb 2020
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.

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.

태그


Translated by