How can I combine strings in SIMULINK like in a MATLAB cell array?

조회 수: 2 (최근 30일)
Rafael Cordero
Rafael Cordero 2020년 11월 16일
댓글: Rafael Cordero 2020년 11월 17일
Hi folks,
Imagine I have 3 string constant blocks:
How can I combine them in such a way to get something like a cell array in MATLAB so that there are 3 elements corresponding to the three strings?:
(Note: The three strings may be of different lengths)
(Note2: I should have made it clearer that the rightmost block is a display block)
Thank you,
Rafael

채택된 답변

Paul
Paul 2020년 11월 17일
According to this doc page Simulink does not support string arrays.
However, it appears that you can pack them all into a bus if all you need to do is flow them as a group from one portion of your model to another and then unpack them for processing.
  댓글 수: 1
Rafael Cordero
Rafael Cordero 2020년 11월 17일
Hey Paul,
Thanks for the reply. I tried fiddling with the bus and it seems to be working. I think I cant do exactly what I wanted but I can work around it with the bus.
Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by