Is there a way to set signal builder block signals in simulink via matlab script?

3 次查看(过去 30 天)
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!

回答(1 个)

Surbhi Pillai
Surbhi Pillai 2018-12-27
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.....

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by