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.
另请参阅
类别
在 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!