- #1
JohanL
- 158
- 0
1.
a line in my code is something like
int(phi*x^2,0,2)
where i want phi to be a function which the user
has choosen. But how can i let the user choose a function? For numbers you can use input but how to do
it with a function?
2.
i want to solve a nonlinear system of equations in x,y.
exp(-2x)*(2*r*x-1)+1=8*pi*r^2 (1)
exp(-2x)*(2*r*y+1)-1=8*pi*r^2
Do you have to specify r before you solve the system or can you get a solution as function of r,
x=f(r) (2)
y=g(r)
?
x and y are parameters in a spherical symmetric metric and r are the radius so i guess you need a solution like (2)? But is that possible in matlab? Do you need to solve the system for many different r's and then plot the x and y as a function a r?
Thank you.
a line in my code is something like
int(phi*x^2,0,2)
where i want phi to be a function which the user
has choosen. But how can i let the user choose a function? For numbers you can use input but how to do
it with a function?
2.
i want to solve a nonlinear system of equations in x,y.
exp(-2x)*(2*r*x-1)+1=8*pi*r^2 (1)
exp(-2x)*(2*r*y+1)-1=8*pi*r^2
Do you have to specify r before you solve the system or can you get a solution as function of r,
x=f(r) (2)
y=g(r)
?
x and y are parameters in a spherical symmetric metric and r are the radius so i guess you need a solution like (2)? But is that possible in matlab? Do you need to solve the system for many different r's and then plot the x and y as a function a r?
Thank you.