"matrix dimesion must agree" error (simple equation)

1 次查看(过去 30 天)
When i try to run this i got an error like "Error using / Matrix dimensions must agree.
Error in Untitled2 (line 2)
M=3/s"
s=0.01:0.01:0.99;
M=3/s
plot(M,s)
end
Why am i getting this error?

回答(1 个)

Abdurrehman
Abdurrehman 2017-3-19
Instead of / You should use ./ for matrix division

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by