필터 지우기
필터 지우기

How to use libsvm based svm regression model for prediction in simulink ?

조회 수: 2 (최근 30일)
Srikar
Srikar 2016년 6월 7일
답변: Ricardo Gualavisi 2016년 6월 27일
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.

답변 (1개)

Ricardo Gualavisi
Ricardo Gualavisi 2016년 6월 27일
Have you got any solution for this problem ? It would be very helpful for me. Thanks a lot!!

카테고리

Help CenterFile Exchange에서 Signal Operations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by