필터 지우기
필터 지우기

[symbolic] How to get the equation component?

조회 수: 3 (최근 30일)
Sendy Phang
Sendy Phang 2017년 11월 28일
답변: Walter Roberson 2017년 11월 29일
Hi, I using mlx document to do my symbolic calculation. Just wonder how to access equation's component?
That is, sigma_1 in the image attached.
Many thanks
Sendy
  댓글 수: 1
Nicolas Schmit
Nicolas Schmit 2017년 11월 29일
Please post the code generating the symbolic equation.

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

답변 (1개)

Walter Roberson
Walter Roberson 2017년 11월 29일
[s1_c, s1_p] = coeffs(B2ch, sigma_1);
Now s1_c will be a vector of coefficients of sigma_1 in B2, and s1_p will be the corresponding powers of sigma_1. Only the powers that are used will be present. For example for
B21 = r1^3 + (-2*r2*r3 + sigma_1^2*i)*r1 + r2*sigma_1 + 2*r3
[s1_c,s1_p] = coeffs((B21+r3*2)/r1,sigma_1)
s1_c =
[ 20, r2/r1, (r1^3 - 2*r2*r3*r1 + 4*r3)/r1]
s1_p =
[ sigma_1^2, sigma_1, 1]
Notice that the 1 might be there -- that is sigma_1^0, the constant term relative to sigma_1

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by