How to send data from while loop during each iteration to simulink sub system model
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am having a while loop in Particle swarm optimization controller (written in embedded matlab code). The controller should send an updated data to the simulink sub system. this updation is done by iterating while loop. Until the while loop finishes i couldnt send the data, I tried with eliminating while loop, but the optimization program has to be iterated some way
0 commentaires
Réponses (1)
Muruganandham Subramanian
le 30 Nov 2012
while(....)
for (...)
pbest=[...] %no.of data depends on population
gbest=[] %one globally best data
sim('ur model name') %here you can call your simulink model to run by giving input from your global dtata
end
end
1 commentaire
Voir également
Catégories
En savoir plus sur Deployment, Integration, and Supported Hardware dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!