sym function help
이전 댓글 표시
Hi,
I'm trying to write a short script file to quickly calculate some values.
My question is about using the the sym function. I have the code
w = sym('w');
to denote that i want w to be understood as a symbol.
the problem is that the returned value is in a very hard to understand form. I know my equation is correct so that is not the problem. For example, matlab will return
Zc =
((944473296573929*w*(3/2000 - (295147905179352825856*i)/(681791660964305*w) + (1702413117074507*w*i)/2361183241434822606848)*i)/1180591620717411303424 + (819854011140975/1152921504606846976 + (6876370061968011*w*i)/9671406556917033397649408)*(3/2000 - (295147905179352825856*i)/(681791660964305*w) + (1702413117074507*w*i)/2361183241434822606848) + (944473296573929*w*(819854011140975/1152921504606846976 + (6876370061968011*w*i)/9671406556917033397649408)*i)/1180591620717411303424)/(3/2000 - (295147905179352825856*i)/(681791660964305*w) + (1702413117074507*w*i)/2361183241434822606848)
Is there a way for matlab to simplify this further? i.e., why doesn't matlab simplify some of the divisions?
Thanks for any input.
채택된 답변
추가 답변 (1개)
Walter Roberson
2011년 6월 3일
0 개 추천
MuPad only automatically simplifies divisions involving numeric constant values. Apply simplify() to get a more compact expression.
카테고리
도움말 센터 및 File Exchange에서 Common Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!