How i divide a Constant with a Matrix ?

x=[-20:0.5:20]
gzx = 2*G*deltaMzylinder*(zs/(zs^2+x.^2))
plot(x,gzx)
Error using /
Matrix dimensions must agree.

 采纳的回答

We would need to know what zs is to say for certain, but the most likely fix is to use elementwise division, "./".

3 个评论

thx a lot zs is just a constant bro
really nice it worked i am so happy
PS : zs is the depth to my center gravity

请先登录,再进行评论。

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by