How to export data and plot from app designer to excel?

조회 수: 28 (최근 30일)
Kavinprasad M
Kavinprasad M 2022년 8월 22일
댓글: Kavinprasad M 2022년 8월 22일
I have created a plot using a table and used slider to smooth the graph, i don't know how to obtain the smoothed value table and the smoothed plot to excel in Matlab app designer

채택된 답변

Kevin Holly
Kevin Holly 2022년 8월 22일
Please see the app attached. You can use writetable to save your data to an Excel file. You can use xlswritefig found on the File Exchange to save the figure to an Excel file.
  댓글 수: 4
Kevin Holly
Kevin Holly 2022년 8월 22일
Download the funciton from the File Exchange here:
Here are changes I would make to your app:
function ExportButtonPushed(app, event)
% app.Result = 'result.xlsx';
[filename, folder] = uiputfile("result.xlsx");
% writetable(app.stf,app.Result)
writetable(app.stf,fullfile(folder,filename))
% exportgraphics(app.UIAxes2,'result.pdf')
xlswritefig(app.UIAxes2,fullfile(folder,filename))
end
Kavinprasad M
Kavinprasad M 2022년 8월 22일
Thankyou, This works great :), I'll be back with more doubts related to my app >.<

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Bar Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by