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

2 vues (au cours des 30 derniers jours)
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

Réponses (1)

Selva Karna
Selva Karna le 14 Mar 2023
Use symbolic function

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by