Filter löschen
Filter löschen

Take input in Matlab App Designer

15 Ansichten (letzte 30 Tage)
Tejas Mahajan
Tejas Mahajan am 10 Okt. 2020
Kommentiert: Ameer Hamza am 12 Okt. 2020
I want user to give input in commas i.e -> 2,-6,-3,10,6,-6,10 and then work on it.So please help me with this.Im using Matlab App Designer Online.

Antworten (1)

Ameer Hamza
Ameer Hamza am 10 Okt. 2020
You can use uieditfield(): https://www.mathworks.com/help/matlab/ref/uieditfield.html in the app designer. Use the text version of UIEditfield to get the input in a vector format.
  6 Kommentare
Tejas Mahajan
Tejas Mahajan am 12 Okt. 2020
But sir it dossent take multiple negative values, i want user to give input as [1,-3,-5,7] and below that the output must be printed as 1 -3 -5 7 . I hope you getting my problem.
Ameer Hamza
Ameer Hamza am 12 Okt. 2020
str2num is able to handle this case too
A = '[1,-3,-5,7]';
B = str2num(A);
Result
>> B
B =
1 -3 -5 7

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by