Message Boards Message Boards

0
|
4188 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

Does MovingAverage work correctly on multi-dimensional Lists ?

Posted 9 years ago

Hi Community,

I am trying to create an artificial wavefront by using RandomReal and MovingAverage. Here is the code:

rframe = RandomReal[{rmin, rmax}, {rsize, rsize}];
mframe = MovingAverage[Transpose[MovingAverage[rframe, aveblks] ], aveblks];

where:

rmin=0; 
rmax=562*10^(-9);
aveblks=10;
dsize=256;
rsize=dsize+aveblks-1;

When I plot mframe with :

ArrayPlot[mframe, PlotRange -> {0.0, 4*10^(-7)}]

I see the attached image. It looks to me that there are 1 pixel wide longer streaks both vertically and horizontally. I expected a smoother image where these streaks are averaged out by MovingAverage. I really do not want to do interpolation here. Any good tip how to make it happen?

Thanks ahead, János

Attachments:
POSTED BY: Janos Lobb
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract