matlab for app designer

2 ビュー (過去 30 日間)
Irem ERSIN
Irem ERSIN 2021 年 1 月 11 日
編集済み: Irem ERSIN 2021 年 1 月 11 日
% Button pushed function: BUBBLEButton_3
function BUBBLEButton_3Pushed(app, event)
list = num2str(app.INPUTARRAYEditField.Value);
sorted_list = bubble(list);
app.SORTEDARRAYEditField.Value = mat2str(sorted_list);
end

採用された回答

Cris LaPierre
Cris LaPierre 2021 年 1 月 11 日
It looks like you are sorting characters, not numbers. Did you mean to use str2double instead of num2str? You can't enter an array in a numeric edit field, so you must be using a text one. That means your values are already strings, so num2str isn't doing anything.
  4 件のコメント
Irem ERSIN
Irem ERSIN 2021 年 1 月 11 日
Thank you so much!
Cris LaPierre
Cris LaPierre 2021 年 1 月 11 日
If you use num2str instead of mat2str to convert it back, it won't have the brackets around it.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by