How to save data in txt format without scientific notation.

조회 수: 6 (최근 30일)
shirin
shirin 2021년 5월 18일
편집: Cris LaPierre 2021년 5월 21일
Hi, I am trying to load my data to AWG which dose not accept scientific notation. I have tried to use dlmwrite('TogotoDacMIMO1.txt',A_Nor, 'precision', 16) still get the nptation when I save my data :
2.8269726203207152e-13
3.5257748410741503e-12
5.5110084227600461e-12
-2.0964066622603056e-11
1.1847874015501425e-11
-1.2308448206452552e-11
-6.4480386733157884e-11
1.3197832851047832e-10
1.6517143399626652e-10
-2.4140440353300489e-10
-4.0816402439462012e-10
4.2881045364415342e-.....
Could anyone help please?
Thanks

채택된 답변

Cris LaPierre
Cris LaPierre 2021년 5월 18일
편집: Cris LaPierre 2021년 5월 21일
Pehaps try using fprintf and specify a formatspec that does not use exponents. For example
fid = fopen('TogotoDacMIMO1.txt','w');
fprintf(fid,'%.29f \n',A_Nor);
fclose(fid)
Just be aware that the numbers are stored in memory with more digits that what is displayed. This means that, by setting the width to show all the digits of the first number (e-13), all the other numbers will continue to show values to the 29th decimal place, too (not zeros).

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by