I think the following code fullfil your wish... n = 0 : 1 : 20 ; // series in the expansion B = 1.5 ; //beta factor Tm = 1300 * 274.15 ; //base-lithosphere temperature [C] tau = 62.8 ; //lithosphere cooling thermal decay constant [Ma] a = 125000 ; //equilibrium lithospheric thickness [m] alpha = 3.28e-5 ; //thermal expansion coefficient K^-1 // Tm needs to be converted to Kelvin - multiply by 274.15 rho = 3300 ; t = 0 : 5 : 150 ; //lithosphere age [Ma] G = 6.67e-11 ; // LTGA with increasing age of oceanic lithosphere c = 8 * G * alpha * rho * a * Tm / %pi ; m = ( 0 : 20 ) ' ; m1 = 2 * m + 1 ; g = c * sum ( ( B ./ ( m1 .^ 3 * %pi ) .* sin ( m1 * %pi / B ) ) * ones ( t ) .* exp ( - ( m1 .^ 2 * t / tau ) ) , 1 ) ; clf ; plot ( t , g ) Serge Steer ----- Mail original -----
> De: "Lester Anderson" <[email protected]> > À: "International users mailing list for Scilab." > <[email protected]> > Envoyé: Mardi 11 Décembre 2012 08:16:01 > Objet: [Scilab-users] Summation query in Scilab > Hello, > I have an equation structured like in the attached, however I am > unsure of the correct syntax to compute in Scilab. > One can calculate the first term of the expansion but obvioulsy it > needs to go to a large number (approximating infinity eg 20). > I am sure this is something very straightforward! > Any ideas welcome. > Thanks for the help > Lester > att: image of equation, test code > _______________________________________________ > users mailing list > [email protected] > http://lists.scilab.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.scilab.org/mailman/listinfo/users
