フィルターのクリア

What's the difference between surf and surface?

34 ビュー (過去 30 日間)
hzh
hzh 2018 年 11 月 9 日
コメント済み: 斯淇 2023 年 8 月 29 日
I think they are essentially the same function? But why do we have both of them? Are there any differences that I should keep in mind when making choices?

採用された回答

Walter Roberson
Walter Roberson 2018 年 11 月 9 日
編集済み: Walter Roberson 2019 年 1 月 2 日
The difference is that surf checks first to see if the axes Nextplot property says to replace plot, and if so then it does a cla. Then either way it calls surface()
In other words if "hold on" is not in effect (or the internal equivalent) then surf will erase the current plot. surface() will not do that.
The difference is sort of like the difference between line() and plot(). line() never erases the current plot. plot() might erase the current plot, and whether it does or not it will call line to do the drawing work.
  4 件のコメント
siavash Aghaei
siavash Aghaei 2021 年 2 月 1 日
perfect and thorough answer; thanks!
斯淇
斯淇 2023 年 8 月 29 日
Thank you! Really helpful!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by