How to use the exist feature with an if statement?

20 ビュー (過去 30 日間)
Arvind Ganesh
Arvind Ganesh 2019 年 4 月 24 日
回答済み: Fangjun Jiang 2019 年 4 月 24 日
exist varname gives valid output. But if(exist varname) throws an error as "Unexpected matlab expression". How to fix this?

採用された回答

Fangjun Jiang
Fangjun Jiang 2019 年 4 月 24 日
if exist('VarName','var')

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by