In this code how can I put multiple values of "betasqr" for example 0.2, 0.4, 0,6 and subsequently multiple values of "sbar" for example 1/0.02, 1/0.04, 1/0.06 (contd in des)
조회 수: 1 (최근 30일)
이전 댓글 표시
% (contd.) to obtan 9 values of Wbar, Fbar, fbar and Ybar respectively corresponding to "betasqr" = 0.2 ,"sbar" = 1/0.02 ; "betasqr" = 0.2 ,"sbar" = 1/0.04 and similarly for other combinations of "betasqr" and "sbar".
betasqr = 0.2;
gamma = 0.3;
psi = 0.001;
mu = 1.0;
sbar = 1/0.02;
a = 2;
% Steps for finding dimensionless load carrying capacity (Wbar) of the bearing
hbar = @(x) a - a.*x + x;
A = @(x) 4 .* (hbar(x) .^ 3) + sbar .* (hbar(x) .^ 4) - sbar*betasqr*gamma .* (hbar(x) .^ 2) .* sqrt(x .* (1-x)) ;
B = @(x) (1 + sbar .* hbar(x)) .* (1 - betasqr * sqrt(x .* (1-x)));
G = @(x) 12 * psi + A(x) ./ B(x);
Z = @(x) 12 .* hbar(x) + 6*sbar .* (hbar(x) .^ 2) - 2*sbar*betasqr*gamma .* sqrt(x .* (1-x)) ;
E = @(x) Z(x) ./ (1 + sbar .* hbar(x));
C = @(x) E(x) ./ G(x);
IntEbyG = integral(C,0,1);
D = @(x) 1 ./ G(x);
IntGinv = integral(D,0,1);
Q = IntEbyG/IntGinv;
Wdash = @(x) x.*(E(x)-Q) ./ G(x);
IntWdash = integral(Wdash,0,1);
Wbar = (mu/12) - IntWdash
% Steps for finding dimensionless frictional force (Fbar) of the slider
I = @(x) hbar(x) .* (2 + sbar .* hbar(x)) .* (E(x) - Q );
J = @(x) 2 .* G(x) .* (1 + sbar .* hbar(x)) .* (1 - betasqr * sqrt(x .* (1-x)));
Fdash = @(x) (sbar ./ (1 + sbar .* hbar(x))) + I(x) ./ J(x);
Fbar = integral(Fdash,0,1)
% Steps for finding coefficient of friction (fbar)
fbar = Fbar/Wbar % Coefficient of friction
% Steps for finding dimensionless form of x coordinate of center of pressure(Ybar)
L = @(x) (x.^2).*(E(x)-Q) ./ G(x);
IntL = integral(L,0,1);
Ybar = ((mu/24)-(0.5*IntL)) / Wbar
댓글 수: 0
채택된 답변
Dyuman Joshi
2022년 6월 5일
Define dbar as follows, and run a for loop 9 times
dbar = 0.2*(1:9)
sbar = 0.1./dbar
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!