function eta=profile(theta,dol0,hohb) % ****************************************************************** % eta=profile(theta,dol0,hohb) % ****************************************************************** % Spline interpolate profile at phases in theta vector (phases in % degrees) % eta = water level elevation above mean water level divided by % wave height, (column vector) % theta = 2*pi*((x/L)-(t/T)), column vector % dol0 = water depth / L0 % hohb = H/Hb, where Hb = breaking wave height, as determined by % Dean's stream function instabilities. % *********************************************************************** e=[0.500 0.492 0.470 0.433 0.321 0.129 -0.087 -0.321 -0.500 0.910 0.600 0.199 0.009 -0.080 -0.090 -0.090 -0.090 -0.090 0.938 0.413 0.049 -0.039 -0.062 -0.061 -0.061 -0.062 -0.062 0.951 0.287 0.002 -0.042 -0.050 -0.048 -0.048 -0.049 -0.049 0.959 0.210 -0.014 -0.039 -0.043 -0.040 -0.040 -0.041 -0.041 0.500 0.492 0.470 0.433 0.321 0.129 -0.087 -0.321 -0.500 0.857 0.713 0.424 0.177 -0.060 -0.129 -0.141 -0.143 -0.143 0.904 0.606 0.228 0.031 -0.079 -0.095 -0.096 -0.096 -0.096 0.927 0.470 0.116 -0.014 -0.068 -0.072 -0.072 -0.073 -0.073 0.944 0.341 0.056 -0.027 -0.055 -0.056 -0.056 -0.056 -0.056 0.500 0.492 0.470 0.433 0.321 0.129 -0.087 -0.321 -0.500 0.799 0.723 0.538 0.329 0.025 -0.135 -0.183 -0.199 -0.201 0.865 0.692 0.387 0.153 -0.061 -0.123 -0.133 -0.135 -0.135 0.898 0.596 0.251 0.059 -0.072 -0.099 -0.102 -0.102 -0.102 0.922 0.460 0.154 0.015 -0.064 -0.077 -0.078 -0.078 -0.078 0.500 0.492 0.470 0.433 0.321 0.129 -0.087 -0.321 -0.500 0.722 0.682 0.575 0.431 0.146 -0.089 -0.204 -0.266 -0.278 0.810 0.715 0.506 0.294 0.010 -0.131 -0.174 -0.188 -0.190 0.858 0.667 0.383 0.173 -0.041 -0.119 -0.137 -0.141 -0.142 0.889 0.583 0.284 0.101 -0.055 -0.101 -0.110 -0.112 -0.111 0.500 0.492 0.470 0.433 0.321 0.129 -0.087 -0.321 -0.500 0.623 0.603 0.548 0.465 0.257 0.007 -0.177 -0.334 -0.377 0.716 0.673 0.562 0.420 0.150 -0.077 -0.196 -0.269 -0.284 0.784 0.687 0.498 0.318 0.059 -0.106 -0.175 -0.209 -0.216 0.839 0.582 0.363 0.207 0.012 -0.096 -0.137 -0.156 -0.161 0.500 0.492 0.470 0.433 0.321 0.129 -0.087 -0.321 -0.500 0.571 0.558 0.519 0.458 0.293 0.061 -0.144 -0.360 -0.429 0.642 0.617 0.549 0.452 0.232 -0.009 -0.178 -0.320 -0.358 0.713 0.657 0.530 0.390 0.146 -0.061 -0.180 -0.266 -0.287 0.782 0.594 0.417 0.279 0.079 -0.071 -0.151 -0.205 -0.218 0.500 0.492 0.470 0.433 0.321 0.129 -0.087 -0.321 -0.500 0.544 0.533 0.501 0.450 0.306 0.087 -0.124 -0.370 -0.456 0.593 0.576 0.527 0.453 0.270 0.038 -0.152 -0.345 -0.407 0.653 0.616 0.528 0.420 0.207 -0.010 -0.165 -0.305 -0.347 0.724 0.580 0.443 0.326 0.137 -0.033 -0.147 -0.247 -0.276 0.500 0.492 0.470 0.433 0.321 0.129 -0.087 -0.321 -0.500 0.534 0.524 0.494 0.447 0.310 0.097 -0.116 -0.373 -0.466 0.570 0.555 0.514 0.450 0.285 0.061 -0.138 -0.356 -0.430 0.611 0.586 0.521 0.434 0.243 0.025 -0.150 -0.329 -0.389 0.677 0.572 0.456 0.355 0.177 -0.002 -0.140 -0.278 -0.323 0.500 0.492 0.470 0.433 0.321 0.129 -0.087 -0.321 -0.500 0.534 0.523 0.494 0.446 0.310 0.097 -0.116 -0.373 -0.466 0.569 0.554 0.513 0.450 0.286 0.062 -0.137 -0.356 -0.431 0.609 0.585 0.522 0.436 0.245 0.026 -0.149 -0.330 -0.391 0.661 0.595 0.483 0.375 0.187 -0.002 -0.146 -0.291 -0.339 0.500 0.492 0.470 0.433 0.321 0.129 -0.087 -0.321 -0.500 0.533 0.523 0.494 0.446 0.310 0.097 -0.116 -0.374 -0.467 0.569 0.554 0.513 0.450 0.286 0.062 -0.137 -0.356 -0.431 0.608 0.584 0.521 0.435 0.245 0.026 -0.149 -0.331 -0.392 0.657 0.603 0.496 0.385 0.189 -0.004 -0.148 -0.294 -0.343]; for k=1:9 for i=1:10 for j=1:5 row=(i-1)*5+j; W(i,j)=e(row,k); end end et(k,1)=interp2d(dol0,hohb,W); end xp=[0 10 20 30 50 75 100 130 180 230 260 285 310 330 340 350 360]'; xm=-[360 350 340 330 310 285 260 230 180 130 100 75 50 30 20 10 0]'; x=[xm(1:16,1); xp]; for j=1:9 etm(j,1)=et(10-j); end et2=[et; etm(2:8,1); et; etm(2:9,1)]; eta=spline(x,et2,theta);