필터 지우기
필터 지우기

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