How to convert a multidimensional array into an acceptable string for Simulink.Signal initialization?
Show older comments
I need to initialize a Simulink.Signal with a 4-D array:
Q_dro.DataType = 'double';
Q_dro.Dimensions = [101 5 61 3];
Q_dro.Complexity = 'real';
Q_dro.InitialValue = 'tmp.Q_dro';
The 'tmp.Q_dro' is the name of a 4-D array, but the Simulink.Signal.InitialValue needs string scalar as its input, so I don't know how to convert this multidimensional array into an acceptable string. Since its dimensions could be multidimension, so I guess it's actually available but I have no idea how to achive it. Hope to get answer, sincerely thanks:)
2 Comments
Fangjun Jiang
on 17 Apr 2023
Not sure if you need a Simulink.Signal object or a Simulink.Parameter object.
I've experienced at most 2-D signals (e.g. front/rear, left/right wheel speeds). Otherwise, multiple dimensional sigal comes in as a bus, which is nested in strucutre, but not in 3-D or 4-D.
tux tu
on 18 Apr 2023
Accepted Answer
More Answers (0)
Categories
Find more on String 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!