Expression or statement is incorrect--possibly unbalanced
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Dick Rusell
il 12 Set 2014
Commentato: Steven Lord
il 12 Giu 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 Commento
Stephen23
il 12 Giu 2017
Modificato: Stephen23
il 12 Giu 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?
Risposta accettata
Guillaume
il 12 Set 2014
plot(n, xn);
4 Commenti
Steven Lord
il 12 Giu 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.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!