필터 지우기
필터 지우기

Ysweep-Xsw​eepデータを3次元​plotしたい

조회 수: 1 (최근 30일)
Ayumi Oribe
Ayumi Oribe 2019년 12월 25일
댓글: Ayumi Oribe 2019년 12월 26일
X,Y,Z 3列データをそのまま3次元plot する方法を知りたい。
sample の excel file を添付しました。

채택된 답변

Musashi Ito
Musashi Ito 2019년 12월 25일
ご参考までに、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
  댓글 수: 1
Ayumi Oribe
Ayumi Oribe 2019년 12월 26일
大変参考になりました。
3次元のラインで再現できるのですね。

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Kenta
Kenta 2019년 12월 25일
このような感じでいかがでしょうか。左が3次元表示です。
参考までに、右に上からみた図も載せておきます。もう少しきれいに見せる方法もあると思いますが...
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
  댓글 수: 1
Ayumi Oribe
Ayumi Oribe 2019년 12월 26일
'Computer Vision Toolbox が必要です。'というメッセージが出ました。
こちらの環境が不十分で再現することができませんでした。

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!