How do I use Simulink-PS Converter with a data vector importet from Matlab workspace?
Mostrar comentarios más antiguos
I would like to perform a part of my Matlab simulation in Simulink. Therefore, I am using the From Workspace and To Workspace blocks to share the data. By using the Simulink-PS Converter block right after the From Workspace block, as shown ins this simnplified schematic

only constant values can be used. Example using a constant Value 1:
WSDataIn = [0 1];
a = sim('PS_Test','SimulationMode','normal');
Example Using a vector [1 1]:
WSDataIn = [0 1 1];
a = sim('PS_Test','SimulationMode','normal');
The following error massage appears:
Error due to multiple causes.
Caused by:
Error in port widths or dimensions. Output port 1 of 'PS_Test/From Workspace' is a one
dimensional vector with 2 elements. Error in port widths or dimensions. Input port 1 of
'PS_Test/Simulink-PS Converter' is a one dimensional vector with 1 elements.
A sine wave block in simulink is also time-variant and works with the converter. How can I use Simulink-PS Converter with a data vector importet from Matlab workspace? Because I would linke to use a precalculated signal as a signal source.
Respuesta aceptada
Más respuestas (1)
Categorías
Más información sobre Simulink en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!