listdlg showing extra line

2 views (last 30 days)
Hello,
So I used find_system to get all subsystem name, one of them is EmbeddedMATLAB Function.
it occupies only one cell, but if I put it into listdlg it becomes 2 lines of :
Embedded
MATLAB Function
how to make it so that it is also showing as one line on the listdlg?

Accepted Answer

Rik
Rik on 26 Sep 2019
There is probably a char 10 or 13 in there. On newer releases it will show a return symbol in the variable editor, but I don't know if that is the case for R2016b.
You can remove them with the line below.
str=strrep(str,{char(10),char(13)},'');%untested
If that errors you may need to call strrep twice.
str=strrep(strrep(str,char(10),''),char(13),'');
  1 Comment
Muhammad Halindra Prakoso
thank you!
the first code returns 2 cells so I call strrep twice

Sign in to comment.

More Answers (0)

Products


Release

R2016b

Community Treasure Hunt

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

Start Hunting!