How to use the exist feature with an if statement?

조회 수: 50 (최근 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 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