matlab function to simulink error
Mostra commenti meno recenti
here is code for the machine learning function
function y = predictActivity(u)%#codegen
persistent n;
if isempty(n)
n = loadLearnerForCoder('EnsembleModel.mat');
end
y = predict(n,u);
end
whenever i use it on command line it works fine

i make its block in simulink like this

but when run its block in simulink i get many errors like this

plz someone help me in this i have been stuck on this for quite a while
thnx in advance
1 Commento
Jon
il 13 Lug 2022
It looks like you are using a "MATLAB Function" block.
Can you please provide the code that is inside of that block.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Sources in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!