Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

Error "Inner matrix dimensions don't agree" I used the element wise operator but I still have the same error

1 view (last 30 days)
F = [-40:20:40];
x = [0:0.1:0.8]
y = [0:0.1:0.4]
sigma_p = F./(x.*y)
sigma_mx = (F.*y)./(1./12.*(x).*(y).^3);
sigma_my = (F.*x)./(1./12.*(y).*(x).^3);
sigma_net = sigma_p + sigma_mx + sigma_my;
mesh (x,y,sigma_net)

Answers (2)

Image Analyst
Image Analyst on 8 Sep 2016
Edited: Image Analyst on 8 Sep 2016
Perhaps you want to use the linspace() function instead of the colon operator to make sure all vectors are the same length.
F = linspace(-40,40, 9);
x = linspace(0, 0.8, 9);
y = linspace(0, 0.4, 9);

Image Analyst
Image Analyst on 9 Sep 2016

This question is closed.

Community Treasure Hunt

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

Start Hunting!