Matlab and SimuLink Development Forum
Matlab Tutorials
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Welcome to Matlab Forums
Home
Help
Search
Media
Login
Register
Matlab and SimuLink Development Forum
»
Matlab
»
Matlab Programming
»
Topic:
Error In code, Can anyone help!?
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Error In code, Can anyone help!? (Read 732 times)
hitmen
Newbie
Posts: 1
Matlab Forum
Error In code, Can anyone help!?
«
on:
August 24, 2011, 04:46:17 AM »
%I am supposed to plot a sinc function%
xx= [-5:0.1:5];
size(xx);
yy=sin(pi*xx)./(pi*xx);
yy(51)= 1.0;
plot(xx,yy^2);grid;
Error: File: pg30.m Line: 4 Column: 13
Unbalanced or unexpected parenthesis or bracket.
Error using ==> mpower
Matrix must be square.
Error in ==> pg30 at 8
plot(xx,yy^2);grid;
Error using ==> mpower
Matrix must be square.
Error in ==> pg30 at 8
plot(xx,yy^2);grid;
Undefined function or method 'mtimes' for input arguments of type 'cell'.
Error in ==> pg30 at 6
yy=sin(pi*xx)./(pi*xx);
Undefined function or method 'mtimes' for input arguments of type 'cell'.
Error in ==> pg30 at 6
yy=sin(pi*xx)./(pi*xx);
Error using ==> mpower
Matrix must be square.
Error in ==> pg30 at 8
plot(xx,yy^2);grid;
Logged
Matlab and SimuLink Development Forum
Error In code, Can anyone help!?
«
on:
August 24, 2011, 04:46:17 AM »
Print
Pages: [
1
]
Go Up
« previous
next »
Matlab and SimuLink Development Forum
»
Matlab
»
Matlab Programming
»
Topic:
Error In code, Can anyone help!?