Filter löschen
Filter löschen

input vector fra edit text in guide GUI

13 Ansichten (letzte 30 Tage)
polo Mahmoud
polo Mahmoud am 25 Feb. 2020
Kommentiert: polo Mahmoud am 25 Feb. 2020
I have used this code:
MVSENS=str2double(get(handles.edit27, 'String'))
it works fine for a single number like eg. 25, but i want to input a vector like this:
[1 2 3 4 5 6 ]
how do i do that from the edit text box in guide GUI

Akzeptierte Antwort

Adam am 25 Feb. 2020
Bearbeitet: Adam am 25 Feb. 2020
sscanf( str, '%d' )
str2num( str )
would both work if the input is e.g. "1 2 3 4 5 6", although the first returns a column vector, but you can easily transpose it if you wish. The latter still works if you input "[1 2 3 4 5 6]" too.

Weitere Antworten (0)


Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange


Community Treasure Hunt

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

Start Hunting!

Translated by