Info

此问题已关闭。 请重新打开它进行编辑或回答。

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

1 次查看(过去 30 天)
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