Reputation: 25
theta = (0:0.01:2*pi)
r = sin.^2.*(theta) + cos.^2.*(theta)
it returns me this error;
Error using sin. Not enough input arguments.
I am confused, what do i need to change?
Upvotes: 0
Views: 23217
Reputation: 6480
I think sine squared can be done with either:
sin(x).*sin(x)
or
sin(x).^2
Upvotes: 1