Undoing a Tony's Trick

1 view (last 30 days)
Jacqueline Chrabot
Jacqueline Chrabot on 4 Mar 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.
Jacqueline Chrabot
Jacqueline Chrabot on 5 Mar 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);
% time=databin{i};
% time=time(:,datafi.Var{1}); problem with time because its all the
% same
depthdif = diff(depth(1:end -1));
timedif(i)= diff(time(1:end-1));
ss = timedif(i)/depthdif(i); %%%theres no difference in time

Sign in to comment.

Answers (0)


Find more on Tables in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by