Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

# include calculated data into csv file

1 Ansicht (letzte 30 Tage)
isamh am 26 Okt. 2020
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
so, I created a code that does some calculaiotns for me, i have an .xlsx file with data and my code solves for some calcautions that i need. I want to add those calctions to the xlsx file and i found a way to do that. this time, instead of a xlsx file, i have a csv file. how can i do that with the csv file?
please try to help me, im stuck
code for xslx file( i want to keep data already on file and include the calculations)
%Table
Table1 = table(Speed_50_1 , Speed_50_2 , Speed_55_1 , Speed_55_2 , Speed_60_1 , Speed_60_2 , Speed_65_1 , Speed_65_2 , Speed_70);
S = Table1{:,:};
writetable(S,filename,'Sheet',1,'Range','A1:A27')
code for csv(this add the calculations but gets rid of all the data):
Table1 = table(Speed_50_1, Speed_50_2, Speed_55_1, Speed_55_2, Speed_60_1, Speed_60_2, Speed_65_1, Speed_65_2, Speed_70);
S = Table1{:,:};

### Antworten (1)

Mathieu NOE am 27 Okt. 2020
hi
I think the solution already exist :
help writetable
"WriteMode" : - "append": Append to the bottom of the occupied range within the sheet.
##### 30 Kommentare28 ältere Kommentare anzeigen28 ältere Kommentare ausblenden
isamh am 2 Nov. 2020
so something like this?
Table1 = [Speed_50_1, Speed_50_2, Speed_55_1, Speed_55_2, Speed_60_1, Speed_60_2, Speed_65_1, Speed_65_2, Speed_70];
T_new = [T_preserve, PD];
isamh am 2 Nov. 2020
%this is what i got
(line 131)
(argument 1) to be numeric or