Is there a way to set signal builder block signals in simulink via matlab script?
14 views (last 30 days)
Show older comments
Hi,
I am having an issue, where I need to set signal builder block signal and time vectors from a matlab script. For example you can use a workspace variable as "Simulation stop time" but the same doesnt apply for the signal builder block for time and signal vectors, currently I need to go inside of the block and replace all of them by hand.
So what I'm trying to do:
- Run the script, which creates time and signal vectors.
- Overwrite the current time and signal vectors of a signal builder block inside a submodel in simulink.
Something like:
set(model / submodel / signal builder 1 / steering_angle_signal / time values) = steering_time_vector ;
set(model / submodel / signal builder 1 / steering_angle_signal / Y values) = steering_signal_vector
Thanks in advance!
0 Comments
Answers (1)
Surbhi Pillai
on 27 Dec 2018
Hi Dominik
You can consider using 'signalbuilder' function to create and access signal builder blocks from MATLAB script. The documentation corresponding to the same is available below:
I hope this helps.....
0 Comments
See Also
Categories
Find more on Get Started with Simulink 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!