필터 지우기
필터 지우기

Change the expression of number

조회 수: 5 (최근 30일)
Quynh tran
Quynh tran 2017년 5월 24일
댓글: Quynh tran 2017년 5월 25일
Dear all,
I have this number
A=0.1235689745654
but when I need to show it, just only 4 number after dot "." was shown like this.
A =0.1236
But I want it's shown like this
A=0.1235689745654
Could you help me to fix it. Thanks

채택된 답변

Walter Roberson
Walter Roberson 2017년 5월 24일
format long g
and then display the number
  댓글 수: 5
Walter Roberson
Walter Roberson 2017년 5월 25일
fprintf('%.15g', A)
Quynh tran
Quynh tran 2017년 5월 25일
Thank you so much @Walter Roberson

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by