How to change the display format of a symbolic function?

조회 수: 3 (최근 30일)
Benjamin
Benjamin 2021년 1월 14일
답변: Chaitanya Mallela 2021년 2월 4일
Hi dear all,
I have a symbolic function that will be generated as Y = (13500*X^(1229/500))/1000 (X is defined as syms), and I would like to have it as Y = 13.5X^2.458. The format function, or the vpa does not work for all the numbers of this symbolic function, and only re-write it as 13.5*X^(1229/500). is there any way that we be able to convert all numbers?
Thanks

채택된 답변

Chaitanya Mallela
Chaitanya Mallela 2021년 2월 4일
You can try the code by setting symbolic preferences.
syms X;
sympref('FloatingPointOutput',true);
Y = (13500*X^(1229/500))/1000;

추가 답변 (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