Ysweep-Xsweepデータを3次元plotしたい
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ayumi Oribe
le 25 Déc 2019
Commenté : Ayumi Oribe
le 26 Déc 2019
X,Y,Z 3列データをそのまま3次元plot する方法を知りたい。
sample の excel file を添付しました。
0 commentaires
Réponse acceptée
Musashi Ito
le 25 Déc 2019
ご参考までに、3次元の点またはラインをプロットする関数 plot3 でも 3次元のデータのグラフを作成できそうです。
% データの読み込み
T = readtable('sample.xlsx');
% グラフの作成
figure
plot3(T.X,T.Y,T.Z,'.')
xlabel([T.Properties.VariableNames{1} ' のデータ'])
ylabel([T.Properties.VariableNames{2} ' のデータ'])
zlabel([T.Properties.VariableNames{3} ' のデータ'])
grid on
Plus de réponses (1)
Kenta
le 25 Déc 2019
このような感じでいかがでしょうか。左が3次元表示です。
参考までに、右に上からみた図も載せておきます。もう少しきれいに見せる方法もあると思いますが...
![result.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/257154/result.png)
clear;clc;close all
data=xlsread('sample.xlsx');
figure;pcshow(pointCloud(data))
xlabel('x軸')
ylabel('y軸')
zlabel('z軸')
figure;scatter(data(:,1),data(:,2),25,data(:,3),'filled')
colorbar
Voir également
Catégories
En savoir plus sur Annotations 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!