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!