what is wrong in this? how to use isinteger?
Ältere Kommentare anzeigen
function valid= valid_date3(y,m,d)
if ~isscalar(y) || ~isscalar(m) || ~isscalar(d) || ~isinteger(y) || ~isinteger(m) || ~isinteger(d) || y<1 || m<1 || d<1
valid=false;
return
end
valid=valid_date3(1900,2,28)
valid =
logical
0
.
1 Kommentar
Matt J
am 13 Jun. 2020
You should consider using validateattributes() instead.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Simulink Check finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!