rounding the imaginary part of the number

조회 수: 14 (최근 30일)
Luccas S.
Luccas S. 2021년 7월 15일
답변: Alan Stevens 2021년 7월 15일
Z1 =
0.0000e+00 + 7.8765e-04i
I would like the result to appear as 0.0008i in the imaginary part, how to do this?

채택된 답변

Alan Stevens
Alan Stevens 2021년 7월 15일
Z = 0.0000e+00 + 7.8765e-04*1i;
format shortG
round(Z,4)
ans =
0 + 0.0008i

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