How do I handle errors?
古いコメントを表示
I am Trying the following sequence:
kbinput = input( ' ' );
if ischar(next)
error('invalid string - ' );
fprintf('....');
which expects a number
typing a character instead of a number I get this
Error using input Undefined function or variable 't'.
Error in dataplot (line 16)
1 件のコメント
KSSV
2016 年 3 月 16 日
clc; clear all ;
kbinput = input( ' ' );
if ischar(kbinput)
error('invalid string - ' );
fprintf('....');
end
is the code? What you want to do actually?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Entering Commands についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!