필터 지우기
필터 지우기

how to make matlab display final complete results directly

조회 수: 2 (최근 30일)
raymond
raymond 2012년 5월 14일
Here's an example
>> R(1)
ans =
-log(- 1004229921906619062839952526185507/1913851274991446601508198548841385*i - 143584884070040384103267078403784/1913851274991446601508198548841385)
i want to know the value of R(1) R is a 3x1 matrix, and R(1) will display the result in R(1,1) but the results is in a long form,
i need to highlight the results, right click, and click "evaluate selection"
>> -log(- 1004229921906619062839952526185507/1913851274991446601508198548841385*i - 143584884070040384103267078403784/1913851274991446601508198548841385)
ans =
0.6348 + 1.7128i
why is this happening, how can i make it display the final answer 0.6348 + 1.7128i straight away?

채택된 답변

Jan
Jan 2012년 5월 14일
Are you looking for the DISP command?
The number 1004229921906619062839952526185507 has more digits than can be represented as DOUBLE.
  댓글 수: 1
raymond
raymond 2012년 5월 14일
oh i see,
thanks for the info.
i manage to solve it by adding this
double(R(1))
it force it to become double.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by