-
Notifications
You must be signed in to change notification settings - Fork 0
/
rtpplot.m
76 lines (61 loc) · 1.69 KB
/
rtpplot.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
function rtpplot(ECEI,zlabelname)
%to plot a 3-D figure about t, r, Te(or pdata)
%at the middle plane(y=0)
%zlabelname: 'T_e' or '\delta T_e/<T_e>' or others
rows=size(ECEI.pdata,1);
columes=size(ECEI.pdata,2);
middlerow=round(rows/2);
narr=[middlerow,middlerow,middlerow];
mro=[round(columes/4),round(columes/2),round(3*columes/4)];
Fre=1e6;
%--------------------------------------------------------------------------
%selected data in time series
figure
for i=1:length(narr)
plot(squeeze(ECEI.pdata(narr(i),mro(i),:)),selcolor(i));
hold on
end
num1=round(ginput(2));
close gcf
%--------------------------------------------------------------------------
%pick out selected data to pdata1
for i=1:size(ECEI.pdata,1)
for j=1:size(ECEI.pdata,2)
pdata1(i,j,:)=ECEI.pdata(i,j,num1(1):num1(2));
end
end
time1=ECEI.t(num1(1):num1(2));
%--------------------------------------------------------------------------
%selected data in time series
figure
for i=1:length(narr)
plot(squeeze(pdata1(narr(i),mro(i),:)),selcolor(i));
hold on
end
num2=round(ginput(2));
close gcf
%--------------------------------------------------------------------------
%pick out selected data to pdata2
for i=1:size(pdata1,1)
for j=1:size(pdata1,2)
pdata2(i,j,:)=pdata1(i,j,num2(1):10:num2(2));
end
end
time2=time1(num2(1):10:num2(2));
data=squeeze((pdata2(12,:,:)+pdata2(13,:,:)))/2;
[X,T]=hhhh(ECEI.x(1,:),time2);
mesh(T,X,data')
xlabel('time/s')
ylabel('radial distance/cm')
zlabel(zlabelname)
end
function [x,y]=hhhh(x0,y0)
x=zeros(length(y0),length(x0));
y=zeros(length(y0),length(x0));
for i=1:length(y0)
for j=1:length(x0)
x(i,j)=x0(j);
y(i,j)=y0(i);
end
end
end