필터 지우기
필터 지우기

Determine the coefficients in symbolic

조회 수: 3 (최근 30일)
Tobias Dehn Nielsen
Tobias Dehn Nielsen 2022년 11월 24일
댓글: Paul 2022년 11월 25일
On is dependent of In, On_1 and In_1. Is there a way to determine the coefficients multiplied on In, On_1 and In_1. On is of filetype sym.

채택된 답변

Torsten
Torsten 2022년 11월 24일
I don't know why the coefficients appear in the wrong order.
syms In In_1 On_1
On = 91/100*In-7/8*In_1+1/2*On_1;
coeffs(On,[In In_1 On_1])
ans = 
  댓글 수: 5
Torsten
Torsten 2022년 11월 25일
Looks like a bug for me.
Paul
Paul 2022년 11월 25일
I'm not sure it's a bug.
The single output form for a univariate polynomial returns coefficients from lowest to highest order
syms x
c = coeffs([2*x^2 + 3*x + 1])
c = 
But the two output form returns from highest to lowest
[c,t] = coeffs([2*x^2 + 3*x + 1])
c = 
t = 
Seems odd, but both of those cases are documented behavior.
When using the second input argument, vars, I don't see anything in the doc that says that ordering of c corresponds to the order in vars. The doc has a bunch of examples, but it doesn't really explain the process for how it orders c and t.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Conversion Between Symbolic and Numeric에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by