Filter löschen
Filter löschen

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

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

Akzeptierte Antwort

Takumi
Takumi am 30 Okt. 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')

Weitere Antworten (0)

Kategorien

Mehr zu 行列および配列 finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!