Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Problem with format rational
조회 수: 1 (최근 30일)
이전 댓글 표시
I think this question is more direct, specific and right to the issue than the previous one.
The point is that I have a great script with several calls to several mini-scripts inside it. Each mini-script makes some calculations and operations.
Okay, so there is a moment in the second mini-script in which I need to use
format rational
to make some calculations, and then, I like to return to the default format by matlab (which, according to what I have read in Matlab forum, is format short) so the code could return me values with decimals. So, to do so, I write
format short
But the issue is that the following results and calculations that Matlab will give me, they are all of them in format rational, it doesn't give me results in format shor anymore.
It seems I cannot use format rational once and then get rid of it. It seems that once I use format rational, it stays forever in the code. How can ressolve that? What an I doing wrong? I even tried writing just
format
instead of format short, but still doesn`t work.
I only want to use format rational in a scpecific part of that mini-script and then go back using format short (the default one) for the rest of the code.
Thank you!
댓글 수: 1
John D'Errico
2021년 2월 5일
Please. This is NOT a new question. Your problem is that your variables are symbolic. rational format has NOTHING to do with symbolic expressions.
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!