Matrix dimensions must agree;Error
显示 更早的评论
x=linspace(-inf,+inf,300); y==sqrt(16-x.^2)-2; figure plot(x,y)
回答(1 个)
John D'Errico
2018-9-22
As you wrote it, this is a test for EQUALITY. It is NOT an assignment.
y==sqrt(16-x.^2)-2
If you wanted to assign that result to y, then you use =
y=sqrt(16-x.^2)-2
When you get an error, look for syntax problems like that.
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!