필터 지우기
필터 지우기

Make matlab write to a text file WITHOUT scientific notation.

조회 수: 31 (최근 30일)
H R
H R 2019년 12월 4일
답변: Walter Roberson 2019년 12월 4일
Hi there,
I have a matrix say 5*5. The matrix contain some numerical values with many digists shown in scientific notation.
I would like to write this matrix to a text file without any scientific notation. Using "format long " only changes the display and matlab still writes in scientific notation to the text file.
How can i fix this ?

답변 (1개)

Walter Roberson
Walter Roberson 2019년 12월 4일
You can use dlmwrite() and pass in a 'precision' option that is a character vector representing a % format. For example, you could use '%13.6f' if you wanted at least 13 total locations with 6 after the decimal point.

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by