Converting an array of doubles to a string

66 visualizaciones (últimos 30 días)
Jason
Jason el 27 de En. de 2021
Comentada: Jason el 30 de En. de 2021
Whats the best way to convert v which is a class double.
v =
0 0 2736 1824
ans =
'double'
I tried this
v=vidobj.ROIPosition %Get default ROI
class(v)
nv=numel(v);
strROI='';
for i=1:nv
strROI=strROI+char(v(i))
end
strROI
I want to display it in an editbox
app.Edit1.Value=strROI

Respuesta aceptada

David Hill
David Hill el 27 de En. de 2021
How do you want it displayed?
v=[0,0,2736,1824];
d=num2str(v);%once it is a character array you can manipulate it as you desire use sprintf() or regexp()

Más respuestas (0)

Categorías

Más información sobre Data Type Conversion en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by