Scilab does not working as expected

Egidijus Kamarauskas egidijus.kamarauskas at gmail.com
Sat May 7 19:41:41 CEST 2011


Hello
excuse me for my poor English.
I tried to calculate a Sun spectra from black body formula - 
http://en.wikipedia.org/wiki/Planck%27s_law
as function of frequency.
Here is my code:

ny1=[1.5:1.5:30];
x=ny1*10^14;
k=1.38*10^(-24);
T=5800;
h=6.63*10^(-34);
c=3*10^(17);
deff('[y]=f(x)',['y=(2*h*x^3)/(c^2)*(exp((h*x)/(k*T))-1)^(-1)']);
fplot2d( log10(x) , log10(f), style=-1 )

I have learned Scilab basics from this document:
http://www.google.com/url?sa=t&source=web&cd=1&ved=0CBkQFjAA&url=http%3A%2F%2Fcomptlsci.anu.edu.au%2FScilab%2Fprimer.pdf&ei=sYHFTaWrLMOXOra46KII&usg=AFQjCNE3leJn4EbYxSBJetjEJp7Q8EGpcg&sig2=iQp2w7SANLRGZhJgQiRoZg

(or not so long link : http://comptlsci.anu.edu.au/Scilab/primer.pdf )

But I can not understand, why I always become a error : Function not 
defined for given argument type(s).

In a PDF examples shows, that this way need to be working.

Next, I can not understand, why, if I change last line to - fplot2d( x , 
f) - scilab plots a graph, but I do not get a something like this:
http://en.wikipedia.org/wiki/File:Wiens_law.svg

Excuse me for a links in letter.

Next - EXISTS somewhere a RIGHT and FOR ABSOLUTE BEGINNERS documentation?

-- 
Pagarbiai
Egidijus Kamarauskas
egidijus.kamarauskas at gmail.com
+37060707356




More information about the users mailing list