myvalue = [89.33	1300	500	5	18.1	1.393	0.302	610	16	3.694	9945	0.127;
87	1680	505	8	18.1	1.393	0.302	635	16	3.694	9945	0.143;
91.56	2000	585	12	18.1	1.393	0.302	685	16	3.694	9945	0.264;
86	960	440	6	21.1	1.764	0.15	570	13	1.844	2320.8	0.151;
89	1460	485	10	21.1	1.764	0.15	600	13	1.844	2320.8	0.179;
79.78	2300	385	12	21.1	1.764	0.15	520	13	1.844	2320.8	0.168;
90.67	650	600	3	17.7	1.589	0.138	712	14	2.666	682.49	0.087;
93	1000	720	5	17.7	1.589	0.138	820	14	2.666	682.49	0.187;
92	1500	725	7	17.7	1.589	0.138	830	14	2.666	682.49	0.169;
];
nc = myvalue(:,1);//assign  to nc
v = myvalue(:,2);//assign  to v
qc = myvalue(:,3);//assign to qc
ds = myvalue(:,4);//assign to 
phi = myvalue(:,5);//assign  to phi
db = myvalue(:,6);//assign  to db
dm = myvalue(:,7);//assign  to dm
qf = myvalue(:,8);//assign  to qf
dn = myvalue(:,9);//assign  to dn
hs = myvalue(:,10);//assign  to hs
hb = myvalue(:,11);//assign  to hb
nk = myvalue(:,12);//assign  to nk
p1 = ds ./ dn;//obtain pi by diving DS  by DN 
p2 = ds ./ hs;//obtain pi2 by dividing DS  by HS 
p3 = dm ./ db;//calculate p3 by diving DM  with DB 
p4 = (ds).^2 .* v .* dm ./ qf;//calculate p4 by 
p5 = qf ./ qc;//originally p45
p6 = v.^2 .* dm ./ hb
x = [p1 p2 p3 p4 p5 p6]
[results] = automatic(nc, [p2 p3 p4]);;//this one works well but does not print out the R2 value. Only 3 variables handled
[results] = automatic(nc, x);//does not work. Complains that the number of exogenous variables is too much
