Welcome to our community

Be a part of something great, join today!

[SOLVED] Plotting runge kutta 4 stability region

dwsmith

Well-known member
Feb 1, 2012
1,673
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.
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775

dwsmith

Well-known member
Feb 1, 2012
1,673

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
No, I don't have Matlab, and I didn't realize their code was calling an extrinsic function. (Rain)
 

dwsmith

Well-known member
Feb 1, 2012
1,673
I was able to plot it.

 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
Beautiful image, Dustin! (Clapping)

Did you write your own contourplot function?
 

dwsmith

Well-known member
Feb 1, 2012
1,673
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: