
3D plot surface
조회 수: 9 (최근 30일)
이전 댓글 표시
Hello ! I am working on a project that uses ultrasonic sensors to map objects in a room. The module is traveling in a straight line in the middle of a rooom at different altitudes and picking up objects closest to it . I am recording the date in vectors x(module movement) , y(sensor measurements) and z the module altitude. The picture shown illustrates a large object at 40cm floor level and another above it at 100cm between the module flight path and the wall.
I have used plot3 to create this 3d plot and its working fine although the quality will be improved . Is there any way to create a surface over all the points that would have been seen if loooking from the x axis ? I am trying to actually show the objects without the points. I have tried using mesh and other methods found on the matlab help pages but with no luck.
Any help would be much appriated :)

댓글 수: 0
답변 (1개)
Sam Chak
2022년 3월 23일
Hi @GibonCZ
The best is the provide a small sample of the spatial data for testing. Otherwise, the function surf can be used to create a surface plot. See the following example:
[x, y] = meshgrid(-pi:0.15:pi, -pi:0.15:pi);
z = (tanh(x - 1) + tanh(x + 1))/2 + ((tanh(x - 1) - tanh(x + 1))/2).*sign(y);
surf(x, y, z)

참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

