Error: Unexpected MATLAB expression.

1 回表示 (過去 30 日間)
Radoslav Gagov
Radoslav Gagov 2017 年 3 月 11 日
コメント済み: Stephen23 2017 年 3 月 13 日
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 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by