Matlab 2012 crate table

15 views (last 30 days)
HSukas
HSukas on 13 Sep 2017
Commented: HSukas on 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 Comment
Guillaume
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.
  • printmat is not a matlab built-in function, so we have no idea what it is supposed to do.
Is your question actually: how to write an excel file?

Sign in to comment.

Accepted Answer

Guillaume
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]);
  1 Comment
HSukas
HSukas on 13 Sep 2017
Yes i am trying to create an excell file. In this file i want to show my results. xlswrite is worked. Thank you.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!