matlab for app designer

2 vues (au cours des 30 derniers jours)
Irem ERSIN
Irem ERSIN le 11 Jan 2021
Modifié(e) : Irem ERSIN le 11 Jan 2021
% 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

Réponse acceptée

Cris LaPierre
Cris LaPierre le 11 Jan 2021
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 commentaires
Irem ERSIN
Irem ERSIN le 11 Jan 2021
Thank you so much!
Cris LaPierre
Cris LaPierre le 11 Jan 2021
If you use num2str instead of mat2str to convert it back, it won't have the brackets around it.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by