Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: consider I have simple calculator GUI.. how do I export each answer to excel in MATLAB? please help me..i already used xlswrite but it will just replace the answer in excel.. can you help me a code which export each answer to excel which is keep on addin
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
john john

Posts: 18
Registered: 6/22/11
consider I have simple calculator GUI.. how do I export each answer to excel in MATLAB? please help me..i already used xlswrite but it will just replace the answer in excel.. can you help me a code which export each answer to excel which is keep on addin
Posted: Dec 21, 2011 3:06 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Code example:

a = get(handles.input1_gamma,'String'); %gamma
b = get(handles.input2_h,'String'); %h
c = get(handles.input3_q,'String'); %q
d = get(handles.input4_power,'String'); %POWER
% a and b are variables of Strings type, and need to be converted
% to variables of Number type before they can be added together
out = [str2num(a) * str2num(b)* str2num(c)];
e = {'Power','gamma','H','Q'; out,str2num(a),str2num(b),str2num(c)};
xlswrite('results.xls', e, 'Sheet1' , 'A1');



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.