help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Shade region between curves


From: ofeyrpf
Subject: Shade region between curves
Date: Tue, 19 May 2009 07:48:10 -0700 (PDT)

Is it possible with Octave to shade a region between two graphs?

The script is as follows:

clear all
close all
e=2;
Q=1.12e-49;
M=2.73e-54;
x=-1.5;
for i=1:41;
  x2(i)=x;
y(i)=(M)/(e^2-1)*((e*x*(Q/M))-1+sqrt((e*(x)*(Q/M)-1)^2-(1-e^2)*(1-x^2)*(Q/M)^2));
z(i)=(M)/(e^2-1)*((e*x*(Q/M))-1-sqrt((e*(x)*(Q/M)-1)^2-(1-e^2)*(1-x^2)*(Q/M)^2));
 x=x+0.1;
end

plot(x2,y,x2,z)
  legend('Event horizon', 'Inner horizon', "location", 'northwest')

axis([0, 1, 0, 2.5e-49]); 
axis "autox"; 

title("Title");
xlabel("q/m");
ylabel("r");
-- 
View this message in context: 
http://www.nabble.com/Shade-region-between-curves-tp23617879p23617879.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]