3D surface with 1800000 points

조회 수: 7 (최근 30일)
Andreas
Andreas 2011년 12월 29일
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

채택된 답변

John D'Errico
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.
  댓글 수: 1
Andreas
Andreas 2012년 1월 6일
Hi John, thanks for the help.
I've just tried griddata but got the error 'X and Y must be same size or vectors of different orientations'
For gridfit I do get the error that the gridfit is not suitable for double
conv2 is something I do not really understand, except that I need an orhtogonal mtrix, which in my case is not given:
x=3600
y=500
Any help on that?
Thanks in advance.
Andreas

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by