不規則な位置座標に値を格納,プロット

2 vues (au cours des 30 derniers jours)
Ryota Kobayashi
Ryota Kobayashi le 24 Jan 2020
Commenté : Ryota Kobayashi le 27 Jan 2020
MATLAB初心者になります.
下記のようなデータをプロットするにはどのようにすればよろしいでしょうか.
イメージ的には不規則なx,y,zの座標にnの値に応じたカラースケールで表示したいです.
ご教授お願いいたします.
x y z n
-0.0993 0.1685 0.0972 2.7584
-0.0995 0.1687 0.0972 2.6406
-0.0998 0.1688 0.0972 2.8534
-0.1001 0.1689 0.0972 3.3319
-0.1004 0.1691 0.0972 4.5871

Réponses (1)

Akira Agata
Akira Agata le 25 Jan 2020
単純に、それぞれのデータ点をnの値に応じた色で表示するには、以下のようにすれば可能です。データ点が十分にあるようであれば、scatteredInterpolant関数で内挿して、等値面などの形で表示するという方法もあります。
figure
scatter3(x,y,z,[],n,'filled')
xlabel('X','FontSize',12)
ylabel('Y','FontSize',12)
zlabel('Z','FontSize',12)
colorbar
scatter3.png
  1 commentaire
Ryota Kobayashi
Ryota Kobayashi le 27 Jan 2020
ありがとうございます。 解決いたしました!
加えて質問なのですが、 流線を書くことは可能でしょうか?
データとしては位置(x,y,z)とベクトル成分(u,v,w)を持っている状態です。 例によって位置は不規則です

Connectez-vous pour commenter.

Catégories

En savoir plus sur ライティング、透明度、およびシェーディング dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!