How to use libsvm based svm regression model for prediction in simulink ?
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Ricardo Gualavisi
2016 年 6 月 27 日
Have you got any solution for this problem ? It would be very helpful for me. Thanks a lot!!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Simulink Functions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!