I do have calculator GUI, how do i export each answer to excel? which will keep every answer in calculator to the excel?
2 次查看(过去 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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!