format specifier to store log output

조회 수: 6 (최근 30일)
seeker_123
seeker_123 2014년 3월 18일
답변: dpb 2014년 3월 18일
my output for log is log(65536)
ans =
11.090354888959125
i want to store this in file. But i am not getting right format specifier which will save all bits of it. I tried with %f which is saving only 6 digits after decimal point.
please help me in this.
Thank you

답변 (1개)

dpb
dpb 2014년 3월 18일
Use the precision specifier on the format string. From
help fprintf
FORMAT is a string that describes the format of the output fields, and
can include combinations of the following:
* Conversion specifications, which include a % character, a
conversion character (such as d, i, o, u, x, f, e, g, c, or s),
and optional flags, width, and precision fields. For more
details, type "doc fprintf" at the command prompt.

카테고리

Help CenterFile Exchange에서 Prepare Model Inputs and Outputs에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by