Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Math Forum
»
Discussions
»
Software
»
comp.softsys.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




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


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');



