Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

i trung to run this, but it show to me this error :
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
can any one help me .
the error is in line 2 .
this is the code:
fiqure()
1. plot (V_X(1,:)),((V_X(2,:)),'k')
2. hold on
3. title(('--------',int2str(n)))
4. plot ((matrixV(1,:)),((matrixV(2,:)),'--r*')
5. hold off

 採用された回答

Cris LaPierre
Cris LaPierre 2021 年 1 月 12 日
編集済み: Cris LaPierre 2021 年 1 月 12 日
Remove the numbers before you commands.
Check that your parentheses are lining up the way you intend. Your first plot command has a mismatched number of opening and closing parentheses. Syntax should be plot(x,y)
plot(V_X(1,:)),((V_X(2,:)),'k')
^ ^ remove these ones
You use a lot of unnecessary parentheses. Removing these makes it easier to spot mismatches.
figure
plot(V_X(1,:),V_X(2,:),'k')
hold on
title('--------',int2str(n))
plot(matrixV(1,:),matrixV(2,:),'--r*')
hold off

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGeneral Applications についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by