How to use the exist feature with an if statement?

56 Ansichten (letzte 30 Tage)
Arvind Ganesh
Arvind Ganesh am 24 Apr. 2019
Beantwortet: Fangjun Jiang am 24 Apr. 2019
exist varname gives valid output. But if(exist varname) throws an error as "Unexpected matlab expression". How to fix this?

Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 24 Apr. 2019
if exist('VarName','var')

Weitere Antworten (0)

Kategorien

Mehr zu Argument Definitions finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by