Format result in Live Script Editor
조회 수: 12 (최근 30일)
이전 댓글 표시
Hello,
Is it possible in Live Script Editor to format result with symbolic variable ?
For example, the result of x = sym(pi/6); cos(x) is :
ans =
And with the code x = sym(pi/6); fprintf('cos(%s) = %s', x, cos(x)), the result is :
cos(pi/6) = 3^(1/2)/2
I would like to have :
Thanks
댓글 수: 0
답변 (1개)
Sahithi Kanumarlapudi
2019년 9월 27일
There might not be a way if ‘x’ value changes . But if ‘x’ value is fixed you can get the desired result with the help of ‘latex()’ and ‘sym’ functions.
Here are the links for the above mentioned functions.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Number Theory에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!