I have two variable: array and Sw_C that i need to present side-to-side as in the picture attached and I'm using fprintf to do so
but it seems like something is wrong in the fprintf that I'm using at LINE 19. Hope my question make sense and clear to you and please help me to check and correct it. Thank you. The excel data is attached here as well.
*note that in the Rt data in the picture is defined as variable "array" in the script to avoid any confusion
syms Swformat shortp=0.153;Qv=0.980;Rw=0.265;m=1.86;B=3.2;n=2.2;array=xlsread('watersat','Sheet1','A2:A45');Sw_Lab=xlsread('watersat','Sheet1','B2:B45');for i=1:length(array) Rt=array(i); eq=Sw==(Rw./((p^m)*Rt.*(1+(B*Qv*Rw)/Sw))).^(1/n); sol=vpasolve(eq,Sw); a(i)=sol;endSw_C=a';fprintf('\n%2.4s\t%2.4s\n','array','Sw_C');fprintf('%2.4f\t%2.4f\n',array,Sw_C)
Best Answer