matlab for app designer
2 次查看(过去 30 天)
显示 更早的评论
% 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
0 个评论
采纳的回答
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 个评论
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 Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!