How do i correct this error, "subscript indices must either be real positive integers or logicals"?
Show older comments
This is my code so far...
theta = 10:0.5:80
Function_x(theta) = 981./cosd(theta)
Function_y(theta) = 981./sind(theta)
Function_total(theta) = sqrt(Function_x.^2 + Function_y.^2)
The error is in line 2, but it will happen for all three since they are all defined as the same variable. How do i fix this. The problem asks for the x and y pieces of tension at angle theta, which is between 10 and 80 degrees at a 0.5 degree increments. But i dont know how to fix the error about subscript indices must be real positive integers or logicals. Any help would be fantastic.
Accepted Answer
More Answers (0)
Categories
Find more on Dates and Time 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!