Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Error using / Matrix dimensions must agree.

1 Ansicht (letzte 30 Tage)
Kaushik Domadiya
Kaushik Domadiya am 5 Apr. 2020
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
I have include my coding below which is showing operator error. I am trying to do 3D plotting of displacement.
P=[0:300]*10^3;
h=[5:20]*10^-6;
E=130*10^9;
a=150*10^-6;
for Z=0:100
Z(:,Z)= (0.216*P.*a.^4)/(E.*h.^3);
end
surf(P,h,Z)

Antworten (1)

David Hill
David Hill am 5 Apr. 2020
[P,h]=meshgrid(linspace(0,300,300)*10^3,linspace(5,20,15)*10^-6);
E=130*10^9;
a=150*10^-6;
Z= (0.216*P*a^4)./(E*h.^3);
surf(P,h,Z);
  1 Kommentar
Kaushik Domadiya
Kaushik Domadiya am 6 Apr. 2020
Thanks for answer!! But it is showing black surface.. Is there any idea how to make colour graph..

Tags

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by