what is wrong in this? how to use isinteger?
古いコメントを表示
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 件のコメント
Matt J
2020 年 6 月 13 日
You should consider using validateattributes() instead.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Simulink Check についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!