How do i plot this in matlab
1 次查看(过去 30 天)
显示 更早的评论
x = [0:pi/2:2*pi]
y = -(sin(pi/2*cos(x))(-pi/2*sin(x))/cos(x)
Keep getting the "Error: ()-indexing must appear last in an index expression." I understand what the error means, but I've tried replacing some of the () with {}, and I'm still getting the same error. I guess I am unsure which () need to be replaced to {}.
0 个评论
采纳的回答
madhan ravi
2019-9-9
y = -(sin(pi/2*cos(x))Operator missing here(-pi/2*sin(x))./cos(x)
1 个评论
madhan ravi
2019-9-9
Also there’s an extra parenthesis at the beginning of the equation. See https://in.mathworks.com/help/matlab/matlab_prog/array-vs-matrix-operations.html
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!