Let's set the data variable station = cell, header = char, data = double
station = {'st';,'qe';,'qr';}
header = ('where QE QR');
data = [10 15;20 25;30 35;]
To tie it with data2, I made it into a cell type and tied it with data2.
ofn = 'set.csv';
ofid=fopen(ofn,'w');
hdr = header;
fmt = '%s %d %d\n';
data = num2cell(data);
data2 = [station data];
fprintf(ofid,'%s\n',hdr);
fprintf(ofid,fmt,data2{:});
fclose(ofid);
The result I was thinking of was this termination
That's how it was created.
How can I get the result like the picture I want? Please give me your help me
matlab csv
I don't know about matlab
fmt = '%s,%d,%d\n';
I think it should be the ruling party.
© 2024 OneMinuteCode. All rights reserved.