3D surface with 1800000 points
조회 수: 7 (최근 30일)
이전 댓글 표시
Hi,
as you probably see already in the title this is my first real experience with matlab. :)
I do have a plenty of points from a measurement. If I run the normal 3D plot operation meshgrid like:
x=1:1:3600;
y=1:1:500;
z=[1.10957e-005 2.2775e005 0.0000000000 0.000000000 ............];
[x,y]=meshgrid(x,y);
colormap(jet);
surf(x,y,z);
I do get a pretty a bad picture with many peaks and a lot of 'noise. My question is how can I avoid or better rewrite this noise to get a smooth surface. May be I can edit the matrix somehow like for 1.0e-005<x<3.0e-005 do x=((x-1)+(x+1))/2 or something
As preveously mentioned I am not a pro in programming, so if anybody please could help me, it would be great.
Many Thanks in advance!
Andreas
댓글 수: 0
채택된 답변
John D'Errico
2011년 12월 29일
There are a couple of easy solutions.
1. You could use my gridfit, with the x,y,z as input and an appropriate choice of smoothing constant to do some smoothing, but not too much smoothing to lose the signal.
2. You can use conv2, with a (truncated) Gaussian shaped kernel to do the smoothing - a Gaussian blur. Pick some width for the Gaussian that works, not doing too much blurring, but enough to smooth out the noise acceptably.
Either solution is acceptable, and CAN produce reasonable results, but you will need to play with it to decide on how much smoothing/blurring is appropriate for your problem. That depends on how much noise you have, and how badly you need it smooth. Of the two, conv2 will be considerably faster here, but gridfit will take less thought to get it working.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interpolation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!