I have a 401×2 double that plots the bythmetry of a beach.
I have 9 depth positions of sensors on the bottom with data provided in a 1×9 double.
I want to plot the sensors on the bythmetry plot. The depth of sensors don't directly match up with the value of depths given in the 401×2 double.
%(pro=bythymetry 401x2) (zp=depth of sensors 9x1)
plot(pro(:,1),pro(:,2)) %(distance,depth) ,depth decreases as you go below sea level (-#)
for i = length(zp) for j = length(pro(:,2)) if pro(j,2) > zp(i) && pro(j+1,2) < zp(i) %find estimated distance where the depth occurs
hold on plot(pro(j,1),zp(i)) end endend
I could use some help. Anyway I try to write a nested for loop with a conditional statement, I don't get any values! Advice on interpolating and plotting would be helpful
plot(pro(:,1),pro(:,2))
this gives
EDIT: I ATTACHED THE DATA AND A FILE TO HELP YOU UNDERSTAND THE DATA (Try it for yourselves might be fun – theres a sand bar)
Best Answer