How to use of 'prediction block' in Simulink
14 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Gang Gyoo Jin
el 20 de Sept. de 2025 a las 11:01
Comentada: AJ Ibraheem
el 6 de Oct. de 2025 a las 13:14
% One-dimension data was generated and the tranined net was save to 'TrainedNetwork_for_Simulation.mat'
% Generate data
t = 0:0.1:50;
y = sin(t) + 0.1 * randn(size(t));
% Train the network
net= feedforwardnet;
net = train(net,t,y);
% Save the trained network
save('TrainedNetwork_for_simulink', 'net');
% I'm trying to use a trained network in a Simulink model(TestPredict.slx), but I'm getting an error. The error message indicates that
% Error in 'TestPredict/Predict': Failed to evaluate mask initialization commands.
% Caused by:
% MAT file TrainedNetwork_for_simulink.mat does not contain a valid SeriesNetwork, DAGNetwork, dlnetwork, yolov2ObjectDetector or an %% % ssdObjectDetector object.
1 comentario
AJ Ibraheem
el 6 de Oct. de 2025 a las 13:14
The 'Predict' block does not support the network type that you've trained.
Try training your network using trainnet instead, see https://uk.mathworks.com/help/deeplearning/ref/trainnet.html
Respuestas (0)
Ver también
Categorías
Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!