
3D plot surface
9 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Sam Chak
on 23 Mar 2022
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)

See Also
Categories
Find more on Graphics Performance in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
