行列のデータ点から滑らかな3D図をつくる方法

Xという31×176の行列を3Dプロットします。
mesh(X)
で添付のような形にプロットでき、概ね満足なのですが、真ん中の最大値のところで
針山のようにとがってしまうのをなんとかしたいです。(その前後での値の変化が激しすぎるからそうなっていると思います)
最大値だけをむすんだりなにか他のコマンドでもよいので、滑らかな3Dプロットの作り方があれば教えてほしいです。mesh_matlabanswers.jpg

 Respuesta aceptada

Takumi
Takumi el 30 de Oct. de 2019

3 votos

内挿補間するのはどうでしょうか。例をあげときます。
[X,Y] = meshgrid(-1:.3:1,-2:.3:2);
V = 0.75*Y.^3 - 3*Y - 2*X.^2;
mesh(X,Y,V);
F = griddedInterpolant(X',Y',V','spline');
[Xq,Yq] = ndgrid(-1:.1:1,-2:.1:2);
Vq = F(Xq,Yq);
figure
mesh(Xq',Yq',Vq')

Más respuestas (0)

Categorías

Más información sobre 内挿 en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 30 de Oct. de 2019

Respondida:

el 30 de Oct. de 2019

Community Treasure Hunt

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

Start Hunting!