Expression or statement is incorrect--possibly unbalanced

2 次查看(过去 30 天)
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 个评论
Stephen23
Stephen23 2017-6-12
编辑:Stephen23 2017-6-12
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?

请先登录,再进行评论。

采纳的回答

Guillaume
Guillaume 2014-9-12
  4 个评论
Steven Lord
Steven Lord 2017-6-12
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by