行列のデータ点から滑らかな3D図をつくる方法
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
rika yamada
el 30 de Oct. de 2019
Respondida: Takumi
el 30 de Oct. de 2019
Xという31×176の行列を3Dプロットします。
mesh(X)
で添付のような形にプロットでき、概ね満足なのですが、真ん中の最大値のところで
針山のようにとがってしまうのをなんとかしたいです。(その前後での値の変化が激しすぎるからそうなっていると思います)
最大値だけをむすんだりなにか他のコマンドでもよいので、滑らかな3Dプロットの作り方があれば教えてほしいです。![mesh_matlabanswers.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/245661/mesh_matlabanswers.jpeg)
![mesh_matlabanswers.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/245661/mesh_matlabanswers.jpeg)
0 comentarios
Respuesta aceptada
Takumi
el 30 de Oct. de 2019
内挿補間するのはどうでしょうか。例をあげときます。
[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')
0 comentarios
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!