How to use the exist feature with an if statement?

51 visualizaciones (últimos 30 días)
Arvind Ganesh
Arvind Ganesh el 24 de Abr. de 2019
Respondida: Fangjun Jiang el 24 de Abr. de 2019
exist varname gives valid output. But if(exist varname) throws an error as "Unexpected matlab expression". How to fix this?

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 24 de Abr. de 2019
if exist('VarName','var')

Más respuestas (0)

Categorías

Más información sobre Argument Definitions en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by