Filter löschen
Filter löschen

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 Ansicht (letzte 30 Tage)
% (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

Akzeptierte Antwort

Dyuman Joshi
Dyuman Joshi am 5 Jun. 2022
Define dbar as follows, and run a for loop 9 times
dbar = 0.2*(1:9)
dbar = 1×9
0.2000 0.4000 0.6000 0.8000 1.0000 1.2000 1.4000 1.6000 1.8000
sbar = 0.1./dbar
sbar = 1×9
0.5000 0.2500 0.1667 0.1250 0.1000 0.0833 0.0714 0.0625 0.0556

Weitere Antworten (0)

Kategorien

Mehr zu Frequently-used Algorithms finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by