I have a knn classification model.i want to simulate the same in simulink
2 ビュー (過去 30 日間)
古いコメントを表示
I have a knn simulation model. I used functions fitcknn and predict in my script...i want to simulate the same in smulink..kindly suggest me which block to be used for fitcknn and predict in simulink
0 件のコメント
回答 (1 件)
Sean de Wolski
2016 年 12 月 13 日
You could use the MATLAB function block to call your KNN model from Simulink.
2 件のコメント
Sean de Wolski
2016 年 12 月 14 日
It shouldn't be in the from workspace block, it should be in a MATLAB function block. Here's how I would set it up. Note that the knn classifier is already trained and stored in a MAT file. You could swap that out to a call to train it if necessary.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/186599/image.png)
参考
カテゴリ
Help Center および File Exchange で Predictive Maintenance Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!