- #1
jimmy1066
- 3
- 0
I have a function f(x,y) that I wish to evaluate for different values of x and y.
I created two lists for x and y using table:
x = Table[x,{x,1/10,1,1/10}]
y = Table[y,{y,1/100,1/10,1/100}]
This gives me 10 values for x and 10 for y.
Now I want to evaluate my function f(x,y) for each point f(x1,y1), f(x1,y2),...,f(x2,y1) etc. This should give me 100 evaluations if I have 10 values for x and y. I've tried to evaluate by just substituting in x and y, but all this gives is 10 values corresponding to f(x1,y1), f(x2,y2), f(x3,y3),...,f(x10,y10).
Obviously I could do this by hand, but that would become a problem if I were to use say 100 values for x and for y, because that's 10000 points.
My second problem is that f(x,y) can be complex for some pairs of (x,y) and for others it has only a real part. Once I have mathematica evaluating the function correctly how do I make it output only the real evaluations?
Apologies for not using Latex. Every time I try to put in f(x,y) it just gives me [Tex]f(x,y)[/Tex]
I created two lists for x and y using table:
x = Table[x,{x,1/10,1,1/10}]
y = Table[y,{y,1/100,1/10,1/100}]
This gives me 10 values for x and 10 for y.
Now I want to evaluate my function f(x,y) for each point f(x1,y1), f(x1,y2),...,f(x2,y1) etc. This should give me 100 evaluations if I have 10 values for x and y. I've tried to evaluate by just substituting in x and y, but all this gives is 10 values corresponding to f(x1,y1), f(x2,y2), f(x3,y3),...,f(x10,y10).
Obviously I could do this by hand, but that would become a problem if I were to use say 100 values for x and for y, because that's 10000 points.
My second problem is that f(x,y) can be complex for some pairs of (x,y) and for others it has only a real part. Once I have mathematica evaluating the function correctly how do I make it output only the real evaluations?
Apologies for not using Latex. Every time I try to put in f(x,y) it just gives me [Tex]f(x,y)[/Tex]