Filter löschen
Filter löschen

Is it possible to output the optimisation results of fitrauto/fitcauto to a table instead of a command prompt?

2 Ansichten (letzte 30 Tage)
I am trying to create an app that will leverage people to be able to create forecasts and models, without having to know code.
This is all based off fitrauto and fitcauto, so that all the user needs to do within the app is to select what the data is, get it cleaned, choose to remove/fill outliers, and select a couple of parameters for the fit functions.
What I would like to have is a tab within the app, either as a table or as HTML, with the optimisation results. Currently, this outputs to the command prompt, but I wonder is there any way of doing this.
I will need to have a few tables/HTML, one for the optimisation process, one for the best observed, and one for the best estimated.
Thanks,
James

Antworten (1)

Rohit
Rohit am 21 Mär. 2023
Yes, it is possible to output the optimization results of fitrauto/fitcauto to a table in your MATLAB app instead of the command prompt.
Here's an example of how you can display the optimization results in a table in your MATLAB app:
% Run fitrauto/fitcauto and obtain optimization results
optimization_results = fitrauto(data, params);
% Convert optimization results to a table
optimization_table = struct2table(optimization_results);
% Create a table UI component and add it to your app's layout
table_component = uitable(app.UIFigure);
table_component.Data = optimization_table;
This is sample code which creates a table UI component using MATLAB's uitable function and adds it to your app's layout.
You can modify this code to create multiple tables for the different outputs you require by repeating the process for each table you need to display in your app.
You can read more about this function in below documentation links-

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by