Undoing a Tony's Trick

6 visualizaciones (últimos 30 días)
Jacqueline Chrabot
Jacqueline Chrabot el 4 de Mzo. de 2021
Comentada: Jacqueline Chrabot el 5 de Mzo. de 2021
Is there a specific format for undoing a Tony's trick? I used tony's trick in a for loop earlier on in my script but now I need to correlate depth values with specific times so I need to reverse the tony trick to get the original date and times back.
  12 comentarios
Image Analyst
Image Analyst el 5 de Mzo. de 2021
I agree with Adam - just save it so you'll have it when you need it again.
Otherwise, attach what you have in a .mat file and tell us what you want to obtain from that variable. It will make it so much easier for people to help you if you give us the variable you're starting with and tell us what you want as the result.
Jacqueline Chrabot
Jacqueline Chrabot el 5 de Mzo. de 2021
I'm trying to write a for loop that finds the max depth per hour and the time associated with it. The time is found in databin{}.Var1 and depth is databin{}.Var7. However, date is all the same since I used Tony's trick originally so I could clean the data. I want to eventually get a speed by finding the difference between each depth change and time change (distance traveled over time it took). I'm trying to find a species swimming speed in the water column by using the distance they travel up and down the water column and the time it takes them. The data in datafi, 16 tables, is the data from one cast and the species movement over a 24 hour time period.
for i=1:length(databin);
temp=databin{i};
temp=temp(:,Varnum1);
% time=databin{i};
% time=time(:,datafi.Var{1}); problem with time because its all the
% same
depth=databin{i};
depth=depth(:,Varnum2);
depthdif = diff(depth(1:end -1));
timedif(i)= diff(time(1:end-1));
ss = timedif(i)/depthdif(i); %%%theres no difference in time
end

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Data Type Conversion en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by