MHB Plotting runge kutta 4 stability region

Dustinsfl
Messages
2,217
Reaction score
5
How can I plot the runge kutta 4 stability region? I know on the i axis the max is \(\pm 2\sqrt{2}\). The plot makes a heart type shape. I don't know how to plot it though but would like to.
 
Mathematics news on Phys.org
Here is an article explaining how to plot this stability region:

http://homepages.cwi.nl/~jason/Classes/numwisk/ch10.pdf
 
MarkFL said:
Here is an article explaining how to plot this stability region:

http://homepages.cwi.nl/~jason/Classes/numwisk/ch10.pdf

I just tried their Matlab code to plot the region but it returns an error:

Undefined function 'contourplot' for input arguments of type 'double'.

Have you tried to plot it?
 
No, I don't have Matlab, and I didn't realize their code was calling an extrinsic function. (Rain)
 
Beautiful image, Dustin! (Clapping)

Did you write your own contourplot function?
 
MarkFL said:
Beautiful image, Dustin! (Clapping)

Did you write your own contourplot function?

Definitely not:

Code:
[X, Y] = meshgrid(-3:.01:1, -3:.01:3); 
Mu = X + i*Y; 
R = 1 + Mu + .5*Mu.^2 + (1/6)*Mu.^3 + (1/24)*Mu.^4; 
Rhat = abs(R); 
Rhat = Rhat.*(Rhat<1);  %# here I truncate 
imagesc([min(X(:)) max(X(:))],[min(Y(:)) max(Y(:))], Rhat) 
colormap(flipud(bone))
 
Last edited:
Back
Top