フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How do I make this code not return the error "Matrix dimensions must agree."?

1 回表示 (過去 30 日間)
Liam Swift
Liam Swift 2018 年 5 月 9 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
d = 2:.1:6
Sy = 250; % yield stress
Fi = 1000; % N/mm % Preload
kb = 200; % Bolt stiffness
km = 100; % Resultant member stiffness
Se = 50; % Endurance limit
Sut = 450; % Ultimate strength
At = 0.25.*pi.*(d.^2);
t = linspace(0,1.5,1000); % time
P = (2000.*t) - (50.*d.*(t.^3));
Pmin = min(P);
Pmax = max(P);
C = kb/(kb+km); % stiffness
Fbmin = (C*Pmin)+Fi;
Fbmax = (C*Pmax)+Fi;
sigma_a = (Fbmax-Fbmin)/(2*At);
sigma_m = (Fbmax+Fbmin)/(2*At);
sigma_max = Fbmax/(2*At);
n = (Se*Sut)/((sigma_a*Sut)+(sigma_m*Se))
n = -n; % Maximize the safety factor
plot (d,n)

回答 (1 件)

IB Ugur
IB Ugur 2018 年 5 月 9 日
編集済み: IB Ugur 2018 年 5 月 9 日
"d" matrix has 41 element so dimension of "d" and "t" dont agree.
P = (2000.*t) - (50.*d.*(t.^3)); check this equation

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by