I do have calculator GUI, how do i export each answer to excel? which will keep every answer in calculator to the excel?

1 次查看(过去 30 天)
I do have calculator GUI, how do i export each answer to excel? which will keep every answer in calculator to the excel? because the one i had every answer will just replace the data not keep on adding... any help?
Code sample : 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)];
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
out = [str2num(a) * str2num(b)* str2num(c)];
e = {'Power','gamma','H','Q'; out, str2num(a),str2num(b),str2num(c)};
xlswrite('answers.xls', e,'Sheet1');

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Import from MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by