How to set matrix as variable with SetBlockParameter ?
Show older comments
Hello,
I am a beginner with Simulink, and I was trying to set the OutValues of a Repeating Sequence interpolated Block to a signal I had defined in my code. For some reason, when applying the following with MySignal as a vector of the values as long as the TimeValues vector ,
model = 'MySimulinkFile' ;
simIn = Simulink.SimulationInput(model) ;
simIn = setBlockParameter(simIn,[model '/Repeating Sequence Interpolated'],'OutValues',string(MySignal)) ;
simOut = sim(simIn) ;
I get this error :
Error in 'MySimulinkFile/Repeating Sequence Interpolated': Failed to evaluate mask initialization commands.
Caused by:
- Error using Simulink.Simulation.internal.DesktopSimHelper
- Dimension 1 of the table in block 'MySimulinkFile/Repeating Sequence Interpolated/Lookup' has a size of 1. Each table dimension must have at least 2 elements.
Am I missing something obvious ? Let me know if the full model is needed, but it is as simple as a Repeating Sequence Interpolated block facing a Scope.
Thank you for your time.
Accepted Answer
More Answers (0)
Categories
Find more on 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!