my app designer app having anova1 (statistical toolbox) works perfectly while matlab is open, but it doesn't work as a standalone(.exe) application after deployment.
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
my app designer app which has anova1 (statistical toolbox) works perfectly while matlab itself is open, but it doesn't work as a standalone(.exe) application after deployment. It gives an "error in anova1" line written in the command prompt. Everything in the app is working fine except anova1 tool. (Matlab R2022b). Any help about it? I checked the build-in functions which are not supported to use in app designer but anova1 is not in the list.
%% Statistical Analysis (ANOVA) & Plot
% app.StatisticsDropDown.Value is an input (gui) from the user, which
% data should be selected for anova analysis thorugh drop down
% menu. That code work in app designer while matlab is open.
if strcmpi(app.StatisticsDropDown.Value, 'Option1')
[~,~,stats] = anova1(MyMatrix1, MyMatrixGroupName1);
[c,~,~,gnames] = multcompare(stats);
tbl = array2table(c,"VariableNames", ...
["Group A","Group B","Lower Limit","A-B","Upper Limit","P-value"]);
tbl.("Group A") = gnames(tbl.("Group A"));
tbl.("Group B") = gnames(tbl.("Group B"));
app.UITable_Stat.Data = tbl;
app.UITable_Stat.ColumnName = tbl.Properties.VariableNames;
app.UITable_Stat.RowName = tbl.Properties.RowNames;
elseif strcmpi(app.StatisticsDropDown.Value, 'Option2')
[~,~,stats] = anova1(MyMatrix2, MyMatrixGroupName2);
[c,~,~,gnames] = multcompare(stats);
tbl = array2table(c,"VariableNames", ...
["Group A","Group B","Lower Limit","A-B","Upper Limit","P-value"]);
tbl.("Group A") = gnames(tbl.("Group A"));
tbl.("Group B") = gnames(tbl.("Group B"));
app.UITable_Stat.Data = tbl;
app.UITable_Stat.ColumnName = tbl.Properties.VariableNames;
app.UITable_Stat.RowName = tbl.Properties.RowNames;
end
5 Commenti
Walter Roberson
il 23 Ago 2023
Copying toolbox code into the path can result in code that will not execute, either because MATLAB complains about the license, or because the code relies upon details of the file structure.
Either use the %#function pragma or use the mcc -a option or use the graphic options of the application compiler to list the additional files.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Analysis of Variance and Covariance in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!