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!