plot 3D data in yz plane
4 次查看(过去 30 天)
显示 更早的评论
I have data obtained from pinhole scanning. The data consist of 4 columns x, y, z and intensity.I want to plot the beam intensity in yz plane to see how the beam looks like. The problem is that I have got 240 graphs which is the number of points along x axis and it is hard to see the full shape of the beam. Is there any other way to represent the data and plot it in yz verses intensity. I appreciate your help. Here is the code i have written.
close all;
clear all;
x = [2850:2.5:2850+2.5*239]; % scan along x axis start with 2850 and increment by 2.5 micron (240 points)
y = [1200:2.5:1200+2.5*159]; % scan along y axis start with 1200 and increment by 2.5 micron for 160 points
Path = 'C:\.5um_Z-900_to_700_Aper10um\SCAN__XYZ__2017_12_11_15_58_30_mUmU_no12_240x160_step2.5um_Z-900_to_700_Aper10um';
Data = zeros(240,160,16);
k = 0;
for j = 1:16
for i = 1:160
k = k+1;
DataTemp = importdata([Path '\lineScan (' num2str(k) ').txt']);
Data(:,i,j)= DataTemp(1:240,4);
end
end
for z=1:240
DATA = Data(:,:,z);
subplot(4,4,z);imagesc(Data(:,:,z)')
end
8 个评论
KSSV
2018-1-9
files = dir('*.txt') ;
N = length(files) ;
figure
hold on
for i = 1:N
i
data = importdata(files(i).name) ;
x = data(:,1) ; y = data(:,2) ; z = data(:,3) ;
c = data(:,4) ;
plot3(x,y,z)
end
This is a point plot of the given files.....we need to arrange the data from the files...to get what you want.
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!