Borrar filtros
Borrar filtros

How to send data from while loop during each iteration to simulink sub system model

4 visualizaciones (últimos 30 días)
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

Respuestas (1)

Muruganandham Subramanian
Muruganandham Subramanian el 30 de Nov. de 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 comentario
V Vaishnavi Kumar
V Vaishnavi Kumar el 31 de Dic. de 2012
K Sr i ll try, while sending data from that
sim('model name')
,will the embedded block receive data from other model,
Here all the blocks are in single simulink model, plz clear me will the embedded block send signal data to subsystem using same command,
how model name for subsystem could be given,

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by