how can i edit code for one phi using all value of P and all output store using for loop

조회 수: 2 (최근 30일)
I want to use one value of phi and all value of P in the for loop where m,P and phi are numeric vetores
for i = phi
n = 10.^(0.426 - 0.235*log10(P(i))./ m;
bita1_bgtl = (-184.05./(1+exp((phi(i)+0.56468)/0.09425)))+0.99494;
M = 1./((bita1_bgtl - phi(i))./k_matrix + phi./k_fl);
mu_Lee1= (mu_matrix*k_matrix.*(1-bita1_bgtl).*G.^2.*(1-phi(i)).^(2*n) + mu_matrix*bita1_bgtl.^2.*M.*G.^2.*(1-phi(i)).^(2*n))./(k_matrix+4*mu_matrix.*(1-G.^2.*(1-phi(i)).^(2*n))/3); % classical Biot-Gassmann theory (BGT)
k_Lee1 = k_matrix.*(1-bita1_bgtl) + bita1_bgtl.^2.*M;
Vp_Lee1 = sqrt((k_Lee1+4*mu_Lee1/3)./rho);
Vs_Lee1 = sqrt(mu_Lee1./rho);
Vs_Lee2_1=Vp_Lee1.*G.*alpha.*(1-phi).^n;
Velocity_ratio1 = Vp_Lee1./Vs_Lee1;
end

답변 (1개)

Selva Karna
Selva Karna 2023년 3월 14일
Use symbolic function

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by