Error: Unexpected MATLAB expression.

Hey guys. I get this error and i have no idea why.
eligible(88 88)
|
Error: Unexpected MATLAB expression.
Here is my code :
function [ E ] = eligible( v,q );
V = (v>88); Q = (q>88);
E = (V+Q == 2) && (v+q > 184);
end

답변 (1개)

Stephen23
Stephen23 2017년 3월 11일
편집: Stephen23 2017년 3월 11일

2 개 추천

The problem is not your function, but how you are calling it: you forgot the comma:
eligible(88,88)
^ you need this!
As the error message clearly shows, you did not use a comma.

댓글 수: 2

Radoslav Gagov
Radoslav Gagov 2017년 3월 13일
Thank you
Stephen23
Stephen23 2017년 3월 13일
@Radoslav Gagov: please accept my answer if it resolves your question.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 File Operations에 대해 자세히 알아보기

태그

질문:

2017년 3월 11일

댓글:

2017년 3월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by