How to use the exist feature with an if statement?

24 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Argument Definitions 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by