Revision 495
(checked in by cbc, 12 years ago)
|
Initial import of Stark code.
|
Line | |
---|
1 |
% |
---|
2 |
% Load data from files |
---|
3 |
% |
---|
4 |
ls *.sq4 *.SQ4 |
---|
5 |
filename=input('Enter the name of .sq4 file: ','s'); |
---|
6 |
load(filename); |
---|
7 |
vsq4=eval(blank(filename(1:length(filename)-4))); |
---|
8 |
% |
---|
9 |
% Set data arrays |
---|
10 |
% |
---|
11 |
x=vsq4(:,1); |
---|
12 |
y=vsq4(:,2); |
---|
13 |
u=vsq4(:,3); |
---|
14 |
v=vsq4(:,4); |
---|
15 |
w=vsq4(:,5); |
---|
16 |
rho=vsq4(:,6); |
---|
17 |
T=vsq4(:,7); |
---|
18 |
S=vsq4(:,8); |
---|
19 |
q2=vsq4(:,9); |
---|
20 |
q2l=vsq4(:,10); |
---|
21 |
enzm=vsq4(:,11); |
---|
22 |
enzh=vsq4(:,12); |
---|
23 |
enzq=vsq4(:,13); |
---|
24 |
% |
---|
25 |
% Create mesh and create boundary |
---|
26 |
% |
---|
27 |
% nnv=input('Enter nnv: '); |
---|
28 |
nnv=21 |
---|
29 |
size(x); |
---|
30 |
nn=ans(1); |
---|
31 |
nseg=nn/nnv-1; |
---|
32 |
femgen |
---|
33 |
bnd=detbndy(in); |
---|
34 |
xmin=min(x(:,1)); |
---|
35 |
xmax=max(x(:,1)); |
---|
36 |
ymin=min(y(:,1)); |
---|
37 |
ymax=max(y(:,1)); |
---|
38 |
% |
---|
39 |
% Plot boundary |
---|
40 |
% |
---|
41 |
newplot='y'; |
---|
42 |
while newplot == 'y', |
---|
43 |
figure |
---|
44 |
whitebg('w') |
---|
45 |
hold on |
---|
46 |
bndo=plotbnd(x,y,bnd); |
---|
47 |
set(bndo,'Color','k') |
---|
48 |
axis([xmin xmax ymin ymax]) |
---|
49 |
axis('off') |
---|
50 |
scalarc=input('Enter variable you desire to contour (u,v,w,rho,T,S,q2,q2l,enzm,enzh,enzq): ','s'); |
---|
51 |
scalar=eval(scalarc); |
---|
52 |
scrange(scalar) |
---|
53 |
[smina,smaxa,ibw]=colorband_fe(in,x,y,bnd,scalar) |
---|
54 |
newplot=input('New variable plot? (y/n): ','s'); |
---|
55 |
end |
---|