Filter löschen
Filter löschen

how can i validate in my code if a user inputs non numeric values? how can i limit just for 4 values?

1 Ansicht (letzte 30 Tage)
this code request four values separated by comma
for vgauss=1:x
prompt={'Ingrese los valores del gaussiano separados por comas: '};
b = inputdlg(prompt,'Gaussiano', [1 50]);
w=b{1,1};
EnChar{1,vgauss}=w;
data{1,vgauss}=str2double(regexp(w,'\d*','match')');
handles.data=data; %estos son los gaussianos [...]
handles.CharGauss=EnChar;
end

Akzeptierte Antwort

Mohammad Abouali
Mohammad Abouali am 25 Nov. 2014
You can check for both type and size.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB 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