can I use elements of array in if statement directly?

조회 수: 1 (최근 30일)
bkshn
bkshn 2015년 6월 14일
댓글: bkshn 2015년 6월 17일
Hello
I have an array (it's name is fullpath) and I want to compare the elements of it in If condition like bellow
if ((fullpath(i-1)-1) > y)
col1=y ;
else
col1=(fullPath(i-1)-1);
end
but I have this error
Undefined function 'fullpath' for input arguments of type 'double'.
Could you help me?
thanks alot

채택된 답변

Walter Roberson
Walter Roberson 2015년 6월 14일
In one of the lines you call the array fullpath and in another line you call it fullPath with a capital P. Probably it should be fullPath in all locations.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Elementary Math에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by