Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

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

1 visualizzazione (ultimi 30 giorni)
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)

Risposte (1)

IB Ugur
IB Ugur il 9 Mag 2018
Modificato: IB Ugur il 9 Mag 2018
"d" matrix has 41 element so dimension of "d" and "t" dont agree.
P = (2000.*t) - (50.*d.*(t.^3)); check this equation

Questa domanda è chiusa.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by