
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!

