Good morning 

To debug a bit of hardware lately, I am plotting a simple wave, which 
deteriates over time. 

use PDL; 
use PDL::Graphics::PGPLOT; 
dev('/XSERVE'); 
$x = sequence(1000)/10; 
$y = sin($x) - log($x)/.5; 
line $x, $y; 

(not very realistic to my real data, but gives you an idea). 

What I want is: 

use PDL; 
use PDL::Graphics::PGPLOT; 
dev('/XSERVE'); 
$x = sequence(1000)/10; 
$y = sin($x) - log($x)/.5; 
line $x, $y; 
hold; 
$z = -log($x)/.5; 
line $x, $z; 

To get that, I think the best data would come from a boxed average (e.g. 
average of every 10 points). There are better fitting routines like Gaussian 
etc, but I don't think it will be as good in this case. 

So my real question, is how do I turn my $y into an average of every 10 
entries, obviously then 1/10th the dimensions, so I need to turn $x into every 
10th for plotting. 

Thanks 

Scott 

-- 

http://scott.dd.com.au/ 
[email protected] 


_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to