Converting an array of doubles to a string

43 ビュー (過去 30 日間)
Jason
Jason 2021 年 1 月 27 日
コメント済み: Jason 2021 年 1 月 30 日
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

採用された回答

David Hill
David Hill 2021 年 1 月 27 日
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()
  1 件のコメント
Jason
Jason 2021 年 1 月 30 日
Thankyou

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by