Why do I get the error Array indices must be positive integers or logical values when using the sin function?
Show older comments
I tried to use this code right out of the help:
>> x=-pi:0.01:pi;
>> plot(x,sin(x)), grid on
But I get the error "Array indices must be positive integers or logical values."
I also tried:
>> z=pi/2
z =
1.5708
>> y=sin(z)
Array indices must be positive integers or logical values.
Accepted Answer
More Answers (0)
Categories
Find more on Multidimensional Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!