How do I use Simulink-PS Converter with a data vector importet from Matlab workspace?
Show older comments
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.
Accepted Answer
More Answers (1)
Categories
Find more on Physical Units in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!