showing Results of Serialportlist in a UITextArea
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Jason
el 26 de Nov. de 2020
Comentada: Avratanu Biswas
el 27 de Nov. de 2020
Hello, I would like to display the available ports on my PC using serialportlist("available")
I have come across the evalc..code below
portstring = evalc('display(serialportlist("available"))')
ReportMessage(app,portstring);
Reportmessage is my own function that adds to a textarea
It works except I get some rubbish first:
1×2 <a href="matlab:helpPopup string" style="font-weight:bold">string</a> array
"COM5" "COM10"
Is there a better way to display the results of serialportlist in a uitextarea?
Thanks
Jason
0 comentarios
Respuesta aceptada
Jason
el 27 de Nov. de 2020
1 comentario
Avratanu Biswas
el 27 de Nov. de 2020
Glad that it worked for you . Using "evalc" never a good idea.( Why Avoid the eval Function? ) - might answer you the reason behind those additional unwanted texts in your very initial post.
Cheers !
A
Más respuestas (1)
Avratanu Biswas
el 26 de Nov. de 2020
Editada: Avratanu Biswas
el 26 de Nov. de 2020
In case I understood your question correctly, what if you write it in this way
portstring = serialportlist("available"); % instead of using evalc
app.UItextarea.Value = portstring; % using the given name of the UItextarea
Ver también
Categorías
Más información sobre Analog Filters en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!