Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'defining functions' topicStudent Support Forum > General > "defining functions"

Next Comment >Help | Reply To Topic
Author Comment/Response
Liat
12/20/05 08:21am

I'm having problems with defining a complicated function - a function that contain several algebric operations:
d = 0.4;
A = (d + 2)/2;
b = ArcCosh[A];
Da1 = 1; (*Da1 = Dahamkouler Number*)
d = Table[((n + 1)*Sinh[(n + 3/2)*b])/(2*Sinh[b]), {n, 0, 10}];
g = Table[-((1/2 +
Da1)*Cosh[(n + 1/2)*b] + ((Cosh[b])/(Sinh[b]))*(n + 1/2)*Sinh[(n + 1/
2)*b]), {n, 0, 10}];
h = Table[((n*Sinh[(n - 1/2)*b])/(2*Sinh[b])), {n, 0, 10}];
G = Table[Switch[i -
j, -1, d[[i]], 0, g[[i]], 1, h[[i]], _, 0], {i, 11}, {j, 11}]
L = Table[Da1*sqrt[2]*Exp[(-((n + 1/2)))*b], {n, 0, 10}]
Hn = LinearSolve[G, L]
I want the function to calculate Hn and I want to be able to use this function in other MATHEMATICA files.



URL: ,

Subject (listing for 'defining functions')
Author Date Posted
defining functions Liat 12/20/05 08:21am
Re: defining functions yehuda ben-s... 12/21/05 01:34am
Next Comment >Help | Reply To Topic