I am getting "Matrix dimensions must agree" error while running the following codings in MatLab. From the first two equations I am getting error because of exp(f.*phi) part. If I remove this part, the code works fine. But I need to add this in both equations. In the last equation I am getting error due to the factor_c part. Could someone help me correcting the mistakes? Thanks
function myfunctionn=0;Ef=40*10^6;df=0.014;rou=3*10^6;S=0:600;f=0.5;phi=0:0.01:pi/2;Le=2;Vf=0.02;P_friction=(pi/2)*sqrt((1+n)*Ef*df^3*rou*S).*exp(f.*phi);Pslip=pi*rou*Le*df*(1-S/Le)*exp(f.phi);factor_a=(4*Vf/(pi*df^2));factor_b=Pslip.*P_friction;factor_c=p_phi*p_z;sigmab=factor_a.*factor_b.*factor_c;end
Best Answer