dlmwrite output of sprintf

1 Ansicht (letzte 30 Tage)
Michael
Michael am 26 Jun. 2014
Beantwortet: Image Analyst am 26 Jun. 2014
Hello all- I have something like this- A0 is a vector with 50 values, lrad is also a vector with 50 values. RMS is an array that is 50X50 that has values that correspond to A0 and lrad combinations.
for j=1:50,
for i=1:50,
disp(sprintf(' %14.12f %9.6f %16.12f',A0(j),lrad(i),rms(i,j)))
end
end
this makes 3 columns of values displayed in the command window. but rather then displaying this I want it to save it to .txt file. I know you use dlmwrite. But dlmwrite(sprintf(....)) doesn't work. It also needs to be in the formats. Any input would be appreciated. Thanks

Antworten (1)

Image Analyst
Image Analyst am 26 Jun. 2014
Use fprintf(fid, ........

Kategorien

Mehr zu Cell Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by