Making a function produce a specific error?
古いコメントを表示
I have a certain function that I created and I need it to produce a certain error when a certain condition is satisfied. For example:
if x > a(1)
error('Error using function y')
end
However, for some reason, when I run the function, the condition is not checked and instead the function computes an output though the condition for the if statement should have been satisfied.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!