Problem while attaining the coefficent of variable

IVW =
1440000*a2*a2s + 12960000*a2*a3s + 12960000*a3*a2s + 103680000*a2*a4s + 155520000*a3*a3s + 103680000*a4*a2s + 777600000*a2*a5s + 1399680000*a3*a4s + 1399680000*a4*a3s + 777600000*a5*a2s + 5598720000*a2*a6s + 11197440000*a3*a5s + 13436928000*a4*a4s + 11197440000*a5*a3s + 5598720000*a6*a2s + 83980800000*a3*a6s + 111974400000*a4*a5s + 111974400000*a5*a4s + 83980800000*a6*a3s + (6046617600000*a4*a6s)/7 + (6718464000000*a5*a5s)/7 + (6046617600000*a6*a4s)/7 + 7558272000000*a5*a6s + 7558272000000*a6*a5s + 60466176000000*a6*a6s
I used fallowing command
Eq_01 =coeffs(IVW ,a2s)
the answer i got from above command is as fallow:
[12960000*a2*a3s + 103680000*a2*a4s + 155520000*a3*a3s + 777600000*a2*a5s + 1399680000*a3*a4s + 1399680000*a4*a3s + 5598720000*a2*a6s + 11197440000*a3*a5s + 13436928000*a4*a4s + 11197440000*a5*a3s + 83980800000*a3*a6s + 111974400000*a4*a5s + 111974400000*a5*a4s + 83980800000*a6*a3s + (6046617600000*a4*a6s)/7 + (6718464000000*a5*a5s)/7 + (6046617600000*a6*a4s)/7 + 7558272000000*a5*a6s + 7558272000000*a6*a5s + 60466176000000*a6*a6s, 1440000*a2 + 12960000*a3 + 103680000*a4 + 777600000*a5 + 5598720000*a6]
My required answer as fallow
1440000*a2 + 12960000*a3 + 103680000*a4 + 777600000*a5 +5598720000*a6

 채택된 답변

You need to specify more terms in your coeffs call. The problem is that then the polynomial separates into two separate polynomials. It is not obvious to me where that originates. In any event, ‘Eq_01(1)’ appears to be the result you want.
Try this —
syms a2 a3 a4 a5 a6 a2s a3s a4s a5s a6s
IVW = 1440000*a2*a2s + 12960000*a2*a3s + 12960000*a3*a2s + 103680000*a2*a4s + 155520000*a3*a3s + 103680000*a4*a2s + 777600000*a2*a5s + 1399680000*a3*a4s + 1399680000*a4*a3s + 777600000*a5*a2s + 5598720000*a2*a6s + 11197440000*a3*a5s + 13436928000*a4*a4s + 11197440000*a5*a3s + 5598720000*a6*a2s + 83980800000*a3*a6s + 111974400000*a4*a5s + 111974400000*a5*a4s + 83980800000*a6*a3s + (6046617600000*a4*a6s)/7 + (6718464000000*a5*a5s)/7 + (6046617600000*a6*a4s)/7 + 7558272000000*a5*a6s + 7558272000000*a6*a5s + 60466176000000*a6*a6s
IVW = 
[Eq_01, T] =coeffs(IVW , [a2s a3s a4s])
Eq_01 = 
T = 
Eq_01(1)
ans = 
Eq_01(2)
ans = 
.

댓글 수: 2

inzamam shoukat
inzamam shoukat 2024년 3월 24일
편집: inzamam shoukat 2024년 3월 24일
Thanks alot Star Strider it worked :)_
As always, my pleasure!

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

제품

릴리스

R2021a

질문:

2024년 3월 24일

댓글:

2024년 3월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by