Display output from neural network on APP Designer
4 次查看(过去 30 天)
显示 更早的评论
I have build a neural network model and saved it to load in APP Designer as shown in figure.
The code is showing no error. But also, it doesn't display the output as required. I have singularly checked each code line's execution in live script and all is working fine. The saved model (MSB.mat) is also being loaded and working fine.
What could be the possibility of no output?
Kindly help!
% Callbacks that handle component events
methods (Access = private)
% Button pushed function: CheckforsuitablematrixButton
function CheckforsuitablematrixButtonPushed(app, event)
% Input variables from the user (Process,Country,FTr,FWf,FAR,TS,TM,FS,FM)
Process=[app.ManufacturingProcessDropDown.Value]
Country=[app.GeographicalLocationDropDown.Value]
FWf=[app.FiberWeightFractionEditField.Value]
FAR=[app.FiberAspectRatioEditField.Value]
TS=[app.TensileStrengthMPaEditField.Value]
TM=[app.TensileModulusGPaEditField.Value]
FS=[app.FlexuralStrengthMPaEditField.Value]
FM=[app.FlexuralModulusGPaEditField.Value]
if strcmp(app.FiberTreatmentDropDown.Value,'Untreated')
FTr=[0];
else
FTr=[1];
end
% Aggregating input variables into a table named IP
IP=table(Process,Country,FTr,FWf,FAR,TS,TM,FS,FM)
% Loading the trained neural network
load MSB.mat
% Predicting the output from the input
Pred_M=predict(MSB,IP)
% Displaying the output
app.UsethegivenMatrixEditField.Value=Pred_M
end
end
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Training and Simulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!