Filter löschen
Filter löschen

Expression or statement is incorrect--possibly unbalanced

2 Ansichten (letzte 30 Tage)
Dick Rusell
Dick Rusell am 12 Sep. 2014
Kommentiert: Steven Lord am 12 Jun. 2017
I'm trying to use plot, but I keep getting this error and I'm not sure why.
n = [0:99];
omega = 1.26 * pi;
xn = sin(omega*n);
plot = (n,xn);
xlabel = ('Time Index, n');
ylabel = ('Amplitude');
axis = ([0 99 -1 1]);
??? plot = (n,xn);
|
Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.
  1 Kommentar
Stephen23
Stephen23 am 12 Jun. 2017
Bearbeitet: Stephen23 am 12 Jun. 2017
plot = (n,xn);
xlabel = ('Time Index, n');
ylabel = ('Amplitude');
axis = ([0 99 -1 1]);
Wow... what dodgy youtube "tutorial" or random teenager's blog showed that incredibly bad syntax and variable naming? Is finding the MATLAB documentation so difficult?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Guillaume
Guillaume am 12 Sep. 2014
  4 Kommentare
Dave Jack
Dave Jack am 12 Jun. 2017
I have an same problem and I have no idea to solve it
Steven Lord
Steven Lord am 12 Jun. 2017
Show a small segment of code with which you can reproduce the error and the full text (everything in red) of the error message you receive when you execute that small segment of code.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by