- printmat is not a matlab built-in function, so we have no idea what it is supposed to do.
Matlab 2012 crate table
15 views (last 30 days)
Show older comments
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 Comment
Guillaume
on 13 Sep 2017
Edited: Guillaume
on 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?
Accepted Answer
Guillaume
on 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]);
More Answers (0)
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!