-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.m
40 lines (34 loc) · 11.2 KB
/
test.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
% test of readCrossSection function
% river cross section entry
% xx = [0:10:100]';
% yy = [10 8 8 7 6 5 0 10 7 8.5 11]';
% xx = [0 0 10 10 12 12 20 20]';
% yy = [10 0 0 10 10 5 5 10]';
% allWL = [-1 1 2 8 12];
xx = [0 32.9 42.85 46.83 88.62 106.53 110.51 150.31 170.21 217.58 239.86 249.81 255.78 285.62 295.58 307.51 311.49 333.38 349.3 369.2 405.02 430.89 472.68 492.58 510.49 524.42 528.4 542.33 559.06 578.15 584.12 592.08 609.98 613.97 635.85 639.83 657.87 671.67 701.52 715.45 727.39 759.23 766.29 787.09 801.02 818.93 840.82 866.69 890.15 912.46 942.3 978.12 1011.95 1027.87 1047.77 1053.74 1083.59 1091.55 1103.49 1115.43 1143.29 1153.24 1187.07 1202.99 1208.96 1218.91 1228.85 1254.72 1302.48 1308.45 1339.1 1366.16 1378.1 1394.02 1405.96 1421.88 1447.75 1463.91 1515.41 1563.17 1585.05 1595 1604.95 1626.84 1638.78 1652.71 1668.63 1674.6 1682.56 1700.47 1734.16 1745.97 1771.56 1785.34 1793.22 1799.12 1826.68 1842.43 1864.08 1887.71 1907.39 1927.08 1936.92 1957.03 1970.39 1997.94 2009.76 2013.69 2029.44 2041.25 2051.3 2058.97 2072.75 2076.69 2096.88 2102.28 2123.93 2149.52 2157.4 2175.11 2181.02 2216.45 2226.3 2236.14 2242.04 2263.7 2271.57 2283.18 2295.2 2320.79 2336.53 2364.09 2368.03 2383.78 2389.69 2399.53 2415.28 2423.15 2436.93 2468.43 2486.14 2497.96 2511.74 2515.67 2529.45 2537.33 2558.98 2576.7 2596.38 2604.24 2627.88 2679.06 2694.81 2704.65 2712.53 2730.24 2749.93 2803.08 2842.45 2864.1 2881.82 2909.38 2919.22 2925.13 2938.91 2956.25 2988.12 3037.34 3070.8 3127.89 3159.39 3177.1 3186.95 3198.76 3216.47 3226.32 3232.22 3253.88 3265.69 3291.28 3309 3340.49 3346.4 3356.24 3395.61 3419.23 3425.14 3442.86 3447.06 3488.13 3513.91 3517.66 3533.41 3543.25 3551.13 3578.69 3586.56 3612.15 3631.84 3663.33 3681.05 3690.89 3710.11 3722.39 3728.64 3742.07 3771.6 3779.48 3791.29 3807.04 3826.72 3840.5 3860.73 3875.94 3881.84 3889.72 3903.5 3923.18 3954.68 3960.58 3974.36 3984.21 4005.86 4047.2 4053.1 4074.76 4080.66 4100.35 4116.1 4126.29 4133.81 4149.56 4157.44 4185 4192.87 4212.56 4218.46 4228.31 4236.18 4249.96 4263.74 4287.36 4295.24 4314.92 4328.7 4334.61 4352.23 4362.2 4373.98 4407.44 4413.35 4427.13 4435 4440.91 4454.69 4468.47 4476.34 4513.74 4523.59 4543.27 4559.02 4568.86 4592.49 4602.33 4610.2 4614.14 4622.01 4630.09 4643.78 4649.57 4663.33 4671.23 4681.07 4686.98 4694.85 4700.76 4710.6 4744.06 4761.78 4767.69 4775.56 4783.44 4797.21 4809.03 4816.9 4830.68 4848.4 4872.02 4891.71 4907.45 4915.33 4931.08 4950.76 4956.67 4982.26 4990.13 5001.94 5009.44 5029.5 5037.38 5055.09 5092.5 5108.25 5112.18 5120.06 5127.93 5133.83 5141.71 5149.58 5153.52 5167.3 5178.66 5188.96 5198.8 5206.94 5212.35 5216.71 5222.42 5240.18 5246.04 5249.98 5257.85 5261.79 5267.84 5283.44 5303.13 5334.63 5350.38 5360.22 5370.06 5399.59 5415.34 5423.21 5435.02 5446.83 5466.52 5470.46 5490.14 5499.98 5513.77 5521.64 5549.2 5564.95 5580.42 5586.6 5600.38 5616.13 5629.91 5645.66 5649.59 5667.31 5679.12 5685.03 5690.93 5714.89 5725.1 5736.21 5751.96 5765.74 5777.55 5787.39 5803.14 5820.77 5832.67 5854.32 5874.01 5897.2 5921.25 5927.16 5940.94 5949.6 5964.56 5984.25 5998.03 6029.52 6039.37 6054.63 6080.71 6092.29 6108.27 6114.17 6122.04 6139.76 6147.64 6161.42 6183.07 6204.72 6222.44 6228.35 6259.84 6275.59 6299.21 6305.12 6354.33 6366.15 6386.06 6389.77 6407.56 6442.92 6470.48 6490.16 6517.72 6533.47 6557.09 6574.81 6594.5 6614.18 6622.06 6631.9 6647.65 6688.99 6708.67 6722.45 6726.39 6742.14 6759.85 6783.48 6805.13 6818.91 6832.69 6844.5 6858.28 6874.03 6893.71 6915.37 6919.31 6925.21 6939.15 6947.17 6955.57 6961.22 6983.28 7011.36 7021.39 7045.46 7077.56 7109.65 7127.71 7157.79 7179.86 7191.9 7193.9 7209.91 7234.02 7252.07 7272.13 7314.26 7324.29 7348.36 7374.43 7394.42 7400.51 7426.59 7438.62 7464.87 7479.96 7484.99 7500.81 7508.48 7522.87 7528.89 7534.9 7550.95 7571.01 7577.25 7617.15 7635.2 7645.23 7657.27 7673.31 7683.34 7687.35 7697.38 7707.41 7727.47 7741.63 7781.63 7805.37 7819.75 7843.81 7847.83 7859.86 7865.88 7883.93 7897.98 7916.03 7944.11 7959.68 7984.23 8003.07]';
yy = [191.48 190.48 189.77 190.06 188.46 186.92 187.17 186.27 186.24 185.26 184.48 184.68 184.1 183.58 183.59 182.95 183.23 183.29 183.06 183.41 183.1 183.36 182.87 182.89 183.22 182.65 182.98 182.68 181.3 181.56 180.87 181.68 181.47 181.02 180.19 180.71 180.41 180.53 178.92 178.46 177.48 175.89 175.15 174.59 173.55 172.93 171.46 170.34 169.74 169.58 168.91 169.02 168.7 169.11 168.47 168.78 168.4 169.05 169.01 168.07 168.22 167.53 166.8 167.16 166.63 166.75 166.11 165.68 165.46 165.78 165.08 165.06 164.63 164.95 164.48 164.77 164.41 164.53 164.54 164.24 164.61 164.1 164.18 163.62 164.01 163.45 163.7 163.09 163.81 163.49 163.25 163.53 162.83 163.28 162.49 163.21 162.82 162.96 162.54 162.84 162.82 162.15 162.65 161.96 162.49 161.83 161.9 162.53 161.97 162.02 161.51 162.52 163.14 161.97 161.72 161.25 161.68 161.02 160.45 161.16 160.53 160.97 160.24 160.38 161.1 160.54 161.16 160.58 160.74 160.44 160.84 160.36 160.84 160.93 160.37 160.91 160.31 160.68 160.36 160.43 160.97 160.79 159.95 160.97 160.93 160.5 160.48 159.93 160.56 160.37 160.9 160.51 159.85 158.45 159.23 159.44 160.28 159.95 160.27 159.88 159.89 160.69 160.32 160.78 160.37 160.45 160.16 160.36 159.98 160.27 160.3 159.87 160.15 159.75 159.88 160.33 159.83 160.26 160.08 160.45 160.92 160.98 161.65 161.47 161.91 161.93 162.26 161.74 161.98 162.16 162.05 162.38 161.95 162.29 161.96 162.02 161.72 162.3 162.05 162.16 161.97 161.46 162.03 162.03 161.41 161.16 161.25 160.94 161.5 160.72 160.59 160.86 160.48 160.86 161.8 160.24 160.68 160.26 160.32 160.73 160.3 160.64 160.15 160.78 161.3 160.84 161.31 160.66 161.94 161.89 161.26 161.22 161.56 161.19 161.8 161.45 162.06 162.13 161.15 161.03 161.95 160.99 161.19 160.59 161.83 160.16 159.92 158.88 158.85 158.16 158.51 157.34 158.02 156.98 157.95 157.31 158.18 157.92 158.14 159.31 158.41 159.32 158.21 156.62 153.41 153.4 151.59 151.05 151.95 152.8 152.58 154.44 156.02 155.11 155.64 155.08 156.66 157.93 158.07 156.73 151.32 151.2 156.9 157.98 156.51 154.71 157.23 158.75 158.65 158.23 158.9 158.12 158.16 158.84 158.43 158.91 158.52 158.91 158.76 158.18 158.73 158.42 158.95 158.46 159.07 158.24 154.81 152.63 152.53 153.83 156.22 156.74 155.49 152.04 151.08 149.11 145.87 143.05 142.6 142.84 144.71 151.03 155.24 155.52 155.17 156.51 156.96 158.21 158.43 157.81 158.32 157.86 157.15 155.14 154.22 155.21 154.88 157.35 157.95 157.95 156.9 156.71 154.89 156.36 157.44 158.79 158.29 159.11 158.87 155.53 148.18 145.24 142.13 140.94 141.13 140.73 140.72 141.73 149.88 153.2 154.55 155.91 156.43 157.47 157.13 156.48 158.61 157.68 157 156.82 155.69 154.93 155.22 156.81 156.64 155.63 154.69 154.51 155.4 158.93 159.47 159.03 159.6 159.28 160.04 160.46 159.98 160.14 159.6 159.79 159.22 159 159.22 159.14 158.28 158.12 158.58 158.32 158.51 158.33 158.43 158.9 158.47 159.05 158.8 158.86 159.72 159.64 160.31 160.67 161.23 161.97 161.95 162.63 162.18 163.06 162.48 163.37 163.28 163.63 163.23 163.81 164.03 163.82 164.52 165.18 164.51 164.93 164.54 165.19 164.85 165.62 165.71 166.25 166.65 168.44 168.84 169.75 170.26 171.44 171.53 172.09 173.68 175.46 177.23 178.18 178.77 179.45 179.55 180.31 180.11 181.25 180.98 181.49 181.47 181.99 182.75 183.64 183.24 183.88 185.02 184.76 185.72 186.15 186.69 186.65 187.44 187.29 188.41 187.83 188.62 188.09 188.93 188.25 188.43 188.87 189.19 190.05 190.89 190.93 191.6 191.59 192.35 192.71 193.91 194.16 196.27 196.43 198.31 198.88]';
% allWL = [140.78 140.88 140.98 141.08 141.18 141.28 141.38 141.48 141.58 141.68 141.78 141.88 141.98 142.08 142.18 142.28 142.38 142.48 142.58 142.68 142.78 142.88 142.98 143.08 143.18 143.28 143.38 143.48 143.58 143.68 143.78 143.88 143.98 144.08 144.18 144.28 144.38 144.48 144.58 144.68 144.78 144.88 144.98 145.08 145.18 145.28 145.38 145.48 145.58 145.68 145.78 145.88 145.98 146.08 146.18 146.28 146.38 146.48 146.58 146.68 146.78 146.88 146.98 147.08 147.18 147.28 147.38 147.48 147.58 147.68 147.78 147.88 147.98 148.08 148.18 148.28 148.38 148.48 148.58 148.68 148.78 148.88 148.98 149.08 149.18 149.28 149.38 149.48 149.58 149.68 149.78 149.88 149.98 150.08 150.18 150.28 150.38 150.48 150.58 150.68 150.78 150.88 150.98 151.08 151.18 151.28 151.38 151.48 151.58 151.68 151.78 151.88 151.98 152.08 152.18 152.28 152.38 152.48 152.58 152.68 152.78 152.88 152.98 153.08 153.18 153.28 153.38 153.48 153.58 153.68 153.78 153.88 153.98 154.08 154.18 154.28 154.38 154.48 154.58 154.68 154.78 154.88 154.98 155.08 155.18 155.28 155.38 155.48 155.58 155.68 155.78 155.88 155.98 156.08 156.18 156.28 156.38 156.48 156.58 156.68 156.78 156.88 156.98 157.08 157.18 157.28 157.38 157.48 157.58 157.68 157.78 157.88 157.98 158.08 158.18 158.28 158.38 158.48 158.58 158.68 158.78 158.88 158.98 159.08 159.18 159.28 159.38 159.48 159.58 159.68 159.78 159.88 159.98 160.08 160.18 160.28 160.38 160.48 160.58 160.68 160.78 160.88 160.98 161.08 161.18 161.28 161.38 161.48 161.58 161.68 161.78 161.88 161.98 162.08 162.18 162.28 162.38 162.48 162.58 162.68 162.78 162.88 162.98 163.08 163.18 163.28 163.38 163.48 163.58 163.68 163.78 163.88 163.98 164.08 164.18 164.28 164.38 164.48 164.58 164.68 164.78 164.88 164.98 165.08 165.18 165.28 165.38 165.48 165.58 165.68 165.78 165.88 165.98 166.08 166.18 166.28 166.38 166.48 166.58 166.68 166.78 166.88 166.98 167.08 167.18 167.28 167.38 167.48 167.58 167.68 167.78 167.88 167.98 168.08 168.18 168.28 168.38 168.48 168.58 168.68 168.78 168.88 168.98 169.08 169.18 169.28 169.38 169.48 169.58 169.68 169.78 169.88 169.98 170.08 170.18 170.28 170.38 170.48 170.58 170.68 170.78 170.88 170.98 171.08 171.18 171.28 171.38 171.48 171.58 171.68 171.78 171.88 171.98 172.08 172.18 172.28 172.38 172.48 172.58 172.68 172.78 172.88 172.98 173.08 173.18 173.28 173.38 173.48 173.58 173.68 173.78 173.88 173.98 174.08 174.18 174.28 174.38 174.48 174.58 174.68 174.78 174.88 174.98 175.08 175.18 175.28 175.38 175.48 175.58 175.68 175.78 175.88 175.98 176.08 176.18 176.28 176.38 176.48 176.58 176.68 176.78 176.88 176.98 177.08 177.18 177.28 177.38 177.48 177.58 177.68 177.78 177.88 177.98 178.08 178.18 178.28 178.38 178.48 178.58 178.68 178.78 178.88 178.98 179.08 179.18 179.28 179.38 179.48 179.58 179.68 179.78 179.88 179.98 180.08 180.18 180.28 180.38 180.48 180.58 180.68 180.78 180.88 180.98 181.08 181.18 181.28 181.38 181.48 181.58 181.68 181.78 181.88 181.98 182.08 182.18 182.28 182.38 182.48 182.58 182.68 182.78 182.88 182.98 183.08 183.18 183.28 183.38 183.48 183.58 183.68 183.78 183.88 183.98 184.08 184.18 184.28 184.38 184.48 184.58 184.68 184.78 184.88 184.98 185.08 185.18 185.28 185.38 185.48 185.58 185.68 185.78 185.88 185.98 186.08 186.18 186.28 186.38 186.48 186.58 186.68 186.78 186.88 186.98 187.08 187.18 187.28 187.38 187.48 187.58 187.68 187.78 187.88 187.98 188.08 188.18 188.28 188.38 188.48 188.58 188.68 188.78 188.88 188.98 189.08 189.18 189.28 189.38 189.48 189.58 189.68 189.78 189.88 189.98 190.08 190.18 190.28 190.38 190.48 190.58 190.68];
allWL=100;
[area, pere, redi, topW]=readCrossSection(xx,yy,allWL);
% plot
figure(2);
subplot(2,2,1)
plot(allWL,area);
title('Area');
ylabel('Area');
xlabel('WL');
subplot(2,2,2)
plot(allWL,pere);
title('Wetted Peremeter');
ylabel('Wetted Peremeter');
xlabel('WL');
subplot(2,2,3)
plot(allWL,redi);
title('Hydraulic Redius');
ylabel('Hydraulic Redius');
xlabel('WL');
subplot(2,2,4)
plot(allWL,topW);
title('Top Width');
ylabel('Top Width');
xlabel('WL');