Effacer les filtres
Effacer les filtres

How to import KNN-model structure from matlab into simulink

11 vues (au cours des 30 derniers jours)
frank wetzels
frank wetzels le 25 Juil 2024 à 15:10
Réponse apportée : Aneela le 26 Juil 2024 à 9:53
All,
The problem I am facing is a move of KNN-model data structure from matlab to simulink in a loop:
In matlab TrainingData is used as input to create an KNN based-model. In simulink, at some point, I want to use this model to predict the outcome of a certain decision based on certain parameters that evolve during simulation. If the simulation ends, the outcome of the decsion is used in matlab to adjust the TrainingData and to update the KNN-model. The updated KNN-model will be used for the next simutlation.
Note that before the loop starts, the feature table exists.
Note that in matlab, the knn-model data is the outcome of the command: knnmodel = fitcknn(TrainingData, 'feature'). So i need to import this knnmodel structure into simulink.
My problem is that I do not see how to successfully import such KNN-model into the simulink model for decision making (prediction).
Is there any method to get this done?

Réponses (1)

Aneela
Aneela le 26 Juil 2024 à 9:53

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Produits


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by