c(z) = 4800+p1+p2*(z/1000)+p3*e^((-p4*z)/(1000))
p1 = 0.0070 p2 = 0.0378 p3 = 0.0016 p4 = 1
Tabel values z = [0 500 1000 1500 2000 2500 3000 3500 4000 5000 6000 7000 8000 9000 10000 11000 12000] c(z) = [5050 4980 4930 4890 4870 4865 4860 4860 4865 4875 4885 4905 4920 4935 4950 4970 4990]
Since the sound speed varies with depth, sound rays will travel in curved paths. A fixed underwater point emits rays in all directions. Given a particular point and initial direction we would like to follow the ray path. Thus letting x be the horizontal coordinate we know the initial values: x = 0, z = z0, dz/dx = tan 0, where 0 denotes the angle between the horizontal line z = z0 and the ray in the start point.
The ray path z(x) is described by the following second order differential equation d^2z /dx^2 = -q*(c'(z)/c(z)^3)
Where q = (c(z0)/cos b)^2. Use ODE45 to trace the ray beginnig at z0 = 2000 feet and b = 7.8 degress.
Follow the ray for 25 nautical miles (1 nautical mile is 6076 feet). Plot the curve z(x). You should find that the depth at xf = 25 nautical miles is close to 2500 feet.
How can i solve this? Any exampels would be nice!
for i=1:length(z) A(i,:)=[1 (z(i)/1000) exp((-p4*z(i))/1000)]; b_r(i,1) = [b(i)-4800]; end
x = b_r\A now i am stuck i dont have a clue how to solve this.
– Amidii Apr 19 '13 at 14:40