How to use of 'prediction block' in Simulink
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
% 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 commentaire
AJ Ibraheem
le 6 Oct 2025 à 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
Réponses (0)
Voir également
Catégories
En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!