- printmat is not a matlab built-in function, so we have no idea what it is supposed to do.
Matlab 2012 crate table
19 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
HSukas
am 13 Sep. 2017
Kommentiert: HSukas
am 13 Sep. 2017
Hello,
I'm trying to create a table which shows my result in gui.I am using matlab 2012 so i cant use 'table' command and then i tried 'printmat' command. It returns empty folder when i run the code. Is there anyone can solve my problem?
Thanks in advance.
This is a simple formula for my case.
x=fopen('untitled.xls','wt');
m=str2double(get(handles.edit1,'String'));
V=str2double(get(handles.edit2,'String'));
d=m/V;
FR=[m V d];
printmat(x,'FR');
fclose(x);
1 Kommentar
Guillaume
am 13 Sep. 2017
Bearbeitet: Guillaume
am 13 Sep. 2017
You haven't defined what a table is. The table class in matlab was introduced in R2013b. Short of you writing your own table class that behaves the same way (would be a lot of work) you can't use that in R2012. There is no table data type in R2012 so we're left guessing what it is you want.
Your code (not formula) snippet is not really helpful because: * you appear to open an excel file using fopen. Unless you know the internal binary format of excel files and intend to write the entire content yourself, you're not going to get anywhere with that. You could write an excel file with xlswrite.
Is your question actually: how to write an excel file?
Akzeptierte Antwort
Guillaume
am 13 Sep. 2017
Complete guess as your question is very unclear: You're trying to write an excel file. In which case:
m = str2double(get(handles.edit1,'String'));
V = str2double(get(handles.edit2,'String'));
xlswrite('untitled.xls', [m, V, m/V]);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spreadsheets 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!