How to use the exist feature with an if statement?

50 vues (au cours des 30 derniers jours)
Arvind Ganesh
Arvind Ganesh le 24 Avr 2019
exist varname gives valid output. But if(exist varname) throws an error as "Unexpected matlab expression". How to fix this?

Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 24 Avr 2019
if exist('VarName','var')

Plus de réponses (0)

Catégories

En savoir plus sur Argument Definitions dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by