How to use libsvm based svm regression model for prediction in simulink ?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Dear Friends and Team, For one of my application, I am required to use libsvm based svm regression prediction model svmpredict in simulink. Currently I tried to achieve it through Simulink library MATLAB Function block, as shown in following code block
function y = fcn(SOC,Curr,Tamb,switch_in)
coder.extrinsic('svmpredict','net','polyvaln','evalin','assignin','mapminmax')
....
switch switch_in
case 1
%'model' is the output structure of svmtrain and svmpredict is
%external function
assignin('base','xtestn',xtestn);
estimate_out = svmpredict(y,xtestn, model);
disp(estimate_out);
estimate_out = 0;
But using this the block goes to somekind of infinite simulation, without keeping track of the time necessary to complete simulation on time.
hence this is causing a stalled simulation at Matlab Function block.
Could anyone help me understand the problem or could anyone suggest me an alternative approach, to achieve the same.
Your help is grately appreciated.
0 commentaires
Réponses (1)
Ricardo Gualavisi
le 27 Juin 2016
Have you got any solution for this problem ? It would be very helpful for me. Thanks a lot!!
0 commentaires
Voir également
Catégories
En savoir plus sur Simulink Functions 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!