フィルターのクリア

Solution of {inf} or {nan} for Surface Plotting.

3 ビュー (過去 30 日間)
Ali Raza
Ali Raza 2019 年 10 月 10 日
コメント済み: Walter Roberson 2019 年 10 月 10 日
Reference to the figure, is there solution for that? I want to plot a smooth surface for my results. Thanks.
1.PNG

回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 10 月 10 日
The solution is to use a finer grid (at least at that end) so that the edges caused by the nan or inf become small enough that the user perceives them as curved.
Depending on your calculations, sometimes it is possible to solve for the boundary conditions and plot accordingly instead of just refining the grid down to the pixel level.
  2 件のコメント
Ali Raza
Ali Raza 2019 年 10 月 10 日
You mean I should increase the step size of the surface grid, so that the corner get smoother??
Walter Roberson
Walter Roberson 2019 年 10 月 10 日
Yes.
You could probably break it up into two pieces, one for x from 0 to 3.5, and another for x from 3.5 to 7 with a finer grid. That would save you from having to calculate a lot of extra values in the "safe" area.
I notice that your x values are not linearly spaced at the moment: you have 40 faces but the 20th face is at about 4 1/2 instead of around 3 1/2.

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

カテゴリ

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