How do I use %d to get a column of numbers in %d format?
Ältere Kommentare anzeigen
Hi, I have the following code, but it isn't working:
x=0.05:0.001:0.25;
for i=1:201
data(i,1) = ('%d',i);
end
for i=1:201
data(i,2) = x(i);
end
save 'data.dat' data -ascii;
I want 201 rows of data, where the first column contains 1 2 3 ... (in %d format) while the second column contains values of x in %e format. How can I do this?
Thank you very much in advance!
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Powertrain Blockset finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!