- #1
dorikin
- 7
- 0
Hello everyone!
I'm trying to write out an equation in MATLAB from a book so that I can make a graph. I am stuck on how to write the intergration part of the equation.
I have uploaded a picture of the page here: http://www.flickr.com/photos/61865210@N07/5736930748/
I am trying to write equation 4.19
The code I have written so far is below. Do I have to use ode45 or quadl? I've looked in the help file but I don't understand >.<
If you have any ideas please post them, I've been trying to do this for the last day! >.<
Thank you!
ken
It will probably be more clear in the link
clear all
clc
[x,y] = meshgrid(-1:.5:1);
L=0.5;
constant=-1/(4*pi);
ln1=log(x.^2+(y-l)^2); %problem
soln= quadl(ln1,-L,L); %problem
potential=constant*soln;
mesh(x,y,potential)
I'm trying to write out an equation in MATLAB from a book so that I can make a graph. I am stuck on how to write the intergration part of the equation.
I have uploaded a picture of the page here: http://www.flickr.com/photos/61865210@N07/5736930748/
I am trying to write equation 4.19
The code I have written so far is below. Do I have to use ode45 or quadl? I've looked in the help file but I don't understand >.<
If you have any ideas please post them, I've been trying to do this for the last day! >.<
Thank you!
ken
Homework Statement
Homework Equations
It will probably be more clear in the link
The Attempt at a Solution
clear all
clc
[x,y] = meshgrid(-1:.5:1);
L=0.5;
constant=-1/(4*pi);
ln1=log(x.^2+(y-l)^2); %problem
soln= quadl(ln1,-L,L); %problem
potential=constant*soln;
mesh(x,y,potential)