have 3 chifre after E

1 回表示 (過去 30 日間)
Abdelhamid Ouarhaden
Abdelhamid Ouarhaden 2021 年 7 月 2 日
回答済み: Star Strider 2021 年 7 月 2 日
I am trying to have this 8.90000000E+007 but i have this just this 8.90000000E+07 i want to have 3 chifre after E
code:
fprintf(fid1,'%s%0.8E\r\n',' ',Frequence(1),)
Is there any way to do this?

回答 (1 件)

Star Strider
Star Strider 2021 年 7 月 2 日
One approach —
expstr = @(x) [x(:).*10.^ceil(-log10(abs(x(:)+(x==0)))) floor(log10(abs(x(:)+(x==0))))]; % Updated: 2021 05 04
fid1 = 1;
Frequence(:,1) = 8.90000000E+007;
fprintf(fid1,'%.8fe%+04d', expstr(Frequence(:,1)))
8.90000000e+007
As requested.
,

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by