Hi,

You need to add a "." to the "/" operator to make the calculation element-wise:

eps0=8.854e-12;
mu0=1.256e-6;
eps=4*eps0;
mu=4*mu0;

zb1=sqrt(mu0/eps0);
zb2=sqrt(mu/eps);
phi=[0:15:90];

theta=asind(((sqrt(eps0*mu0))/sqrt(eps*mu))*sind(phi));
rho=-((zb1*cosd(theta)-zb2*cosd(phi))./(zb1*cosd(theta)+zb2*cosd(phi)));
tau=(2*zb2*cosd(phi))./(zb1*cosd(theta)+zb2*cosd(phi));

See http://help.scilab.org/docs/5.5.0/en_US/slash.html for more info.

Regards,
Paul


On 05/30/2014 01:54 PM, Modestas Bunokas wrote:
Hello, can't find what did wrong.

/eps0=8.854e-12;
mu0=1.256e-6;
eps=4*eps0;
mu=4*mu0;

zb1=sqrt(mu0/eps0);
zb2=sqrt(mu/eps);
phi=[0:15:90];

theta=asind(((sqrt(eps0*mu0))/sqrt(eps*mu))*sind(phi));
rho=-((zb1*cosd(theta)-zb2*cosd(phi))/(zb1*cosd(theta)+zb2*cosd(phi)));
tau=(2*zb2*cosd(phi))/(zb1*cosd(theta)+zb2*cosd(phi));/

theta calculating perfectly, but last two (rho and tau) getting only one
result, and even doubt that it's correct. Seems need to add data in other
way. Could someone help me to understand my mistake?

Thank you




--
View this message in context: 
http://mailinglists.scilab.org/Scilab-not-calculating-all-results-Not-a-bug-mistake-made-by-me-tp4030628.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

--
Paul BIGNIER
Development engineer
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
Phone: +33.1.80.77.04.69
http://www.scilab-enterprises.com

_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to