I want write a data to excel;the data are generated from integration
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to use xlswrite function to write data to excel, the data are generated from an integration done with this code:
syms t
fun = t;
ht = matlabFunction(int(fun,0,t));
tvals = zero_time;
h = tvals;
Lt = Lo-Vo.*(zero_time)+(2/(7850*5180*a)).*h;
I have tried the following procedures:
xlswrite('trial_2',A,'1','A1');
xlswrite('Trial_1.xlsx',data,'1','B2');
xlswrite([PathName,FileName],{'True Strain'},1,'xlRange1')
Error message is server throw it away
1 commentaire
dpb
le 20 Oct 2016
Do NOT use contributors names as tags; that's abuse of site code of conduct if nothing else.
I deleted them this time instead of the question; next time won't be so slow/patient...
Réponses (1)
dpb
le 20 Oct 2016
Modifié(e) : dpb
le 20 Oct 2016
xlswrite('trial_2',A,'1','A1');
Is there actually a sheet named '1'? Default Excel names are Sheet1, etc. If intending the ordinal first sheet, use integer value, not string. Also, the filename isn't a fully-qualified workbook name; xlswrite won't fill that in for you. That doesn't address the issue there's no A variable in sight, either...
xlswrite('Trial_1.xlsx',data,'1','B2');
Same issue w/ the sheet index and what data is.
xlswrite([PathName,FileName],{'True Strain'},1,'xlRange1')
None of the variables defined in your posting; can't comment on that but the cell string reference isn't going to give a legal variable name. Dynamic variable naming in Matlab is to be avoided if that's the intent. You did get the ordinal sheet number correct, this time, though...
"Error message is server throw it away"
I've no klew what the above means???
0 commentaires
Voir également
Catégories
En savoir plus sur Environment and Settings dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!