Borrar filtros
Borrar filtros

linking simulink from m-file

1 visualización (últimos 30 días)
Krishnendu Mukherjee
Krishnendu Mukherjee el 26 de En. de 2012
By using sim('modelname'); i can open a model from m-file.but if i want to get a particular data/signal from the simulated model,such that the data/signal will be stored in a variable.then what command should i use?

Respuesta aceptada

Andreas Goser
Andreas Goser el 26 de En. de 2012
This is a matter of the return variables of the SIM command. This examples code is from the documentation:
Specify parameter name-value pairs within the sim command:
simOut = sim('vdp','SimulationMode','rapid','AbsTol','1e-5',...
'SaveState','on','StateSaveName','xoutNew',...
'SaveOutput','on','OutputSaveName','youtNew');
Important is, that you need - like in this example - an "out" Block at the end of the relevant signal(s).
  1 comentario
Krishnendu Mukherjee
Krishnendu Mukherjee el 26 de En. de 2012
getting a error "TIMESPAN" should be a real vector or scelor.can anyone explain why getting the error?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre View and Analyze Simulation Results en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by