Why does my V returns a single scalar value?

1 回表示 (過去 30 日間)
Amanda Liu
Amanda Liu 2021 年 6 月 16 日
コメント済み: Amanda Liu 2021 年 6 月 17 日
% Given
P = 3000;
E = 7e10;
h = 0.1;
b = 0.005;
t = 0.008;
w1 = 0.15;
w2 = 0.09;
L = 2;
% Input
x0=0;
dt=0.1;
x=x0:dt:L;
W=@(x) (x>=0 & x<=L/2).*w1 + (x>L/2).*w2;
w=W(x);
I=(w*h^3-(h-2*t)^3*(w-b))/12;
V=(P*x.^2).*(3*L-x)/(E*I);

採用された回答

Stephen23
Stephen23 2021 年 6 月 16 日
編集済み: Stephen23 2021 年 6 月 16 日
You are using the wrong divide operator:
V=(P*x.^2).*(3*L-x)./(E*I)
% ^^
  1 件のコメント
Amanda Liu
Amanda Liu 2021 年 6 月 17 日
Ah I missed out that one.Thank you!

サインインしてコメントする。

その他の回答 (0 件)

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by