MATLAB Answer format

조회 수: 4 (최근 30일)
Josh
Josh 2012년 3월 20일
Why does my answer appear as (as example) 1234567/987654*pi^2? Why will it not appear as a number? If I then copy and paste the answer, and hit enter, I get the number. But why when I type W= do I get the equation? I have tried changing the format to short, shortE, shortG...anything. Thanks.

채택된 답변

Oleg Komarov
Oleg Komarov 2012년 3월 20일
Is W a symbolic variable?
  댓글 수: 3
Oleg Komarov
Oleg Komarov 2012년 3월 20일
The type sym has a specific way of displaying results.
Just convert to double
double(W)
Josh
Josh 2012년 3월 20일
Perfect! Thanks!

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

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