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
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!