Plot, Expression or statement is incorrect--possibly unbalanced (, {, or [.

%plot graphs
hold on
plot(wt,m,'b')
xlabel('Time (s)')
ylabel('Torque (Nm)')
The error is showing for the ylabel line

3 commentaires

Looks okay to me, can you attached a screenshot?
I suspect the problem is actually somewhere else in your code. An unterminated parentheses or bracket can confuse Matlab regarding where exactly the problem is.
I bet you retyped your code into your question. Copy and paste the code instead. Take several lines before also. Most likely the problem occurs several lines above.

Réponses (0)

Cette question est clôturée.

Question posée :

le 18 Nov 2014

Clôturé :

le 20 Août 2021

Community Treasure Hunt

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

Start Hunting!

Translated by