-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathokcdataimportDeneTe.m
54 lines (44 loc) · 1.18 KB
/
okcdataimportDeneTe.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
%name='/Users/centerforenergyresearch/Desktop/untitled folder/oct252.5dene/Oct252.5dene.';
name='/Users/centerforenergyresearch/Desktop/untitled folder/oct254.0dene/Oct254.0dene.'
%name='/Users/centerforenergyresearch/Downloads/FLASH4.3/results/PreplasmaMar2016/PrePlasmaEdens/PrePlasma120mJEdens2.0.'
visitname=[name, 'visit'];
blocks='1';
nblocks=0;
[blocks, nblocks]=textread(visitname, '%s %d', 1);
fid=fopen(visitname);
tline = fgets(fid);%head line
tline = fgets(fid);
tline(end)=[];
X=0; Y=0; Dene=0; Tele=0;
for i=1:nblocks
filename = tline;
[x, y, z, dene, tele]= textread(filename, '%f %f %f %f %f', 'headerlines', 11);
X=[X;x];
Y=[Y;y];
Dene=[Dene;dene];
Tele=[Tele; tele];
tline = fgets(fid);
tline(end)=[];
end
X(1)=[];
Y(1)=[];
Dene(1)=[];
Tele(1)=[];
fclose(fid);
%%set the boundary for x=0.
%lineoutfile=[name,'curve'];
%[y,dene]=textread(lineoutfile, '%f %f', 'headerlines', 3);
%x=linspace(0,0,length(y))';
%X=[X;x];
%Y=[Y;y];
%Dene=[Dene;dene];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%for a symmetry%%%%%%%
%X=[X;-X];
%Y=[Y; Y];
%Dene=[Dene;Dene];
%Tele=[Tele; Tele];
%%%%%%%%%%%%%%%%%%%%%%
%X=X/100;
%Y=Y/100;
%F=scatteredInterpolant(X,Y,Dene);