Hi, I am using a function to convert the time to seconds based on specific input. 'time_data_observation_entry,real_time_vec,frame_vec are column vetors and frame_rate_played_video = 8. time_data_observation_entry have two columns. After performing the 'ismember' operation, i am not able to preserve the real_time corresponding to time_data_observation_entry. It looses the structure of the data. Any help to solve this will be appreciated
time_data_observation = load('time_data_observation.mat')frame_rate_played_video = 8;real_time_vec = load('real_time_vec');frame_vec = load('frame_vec');function [real_time] = time_from_videos_to_second_convertor(time_data_observation_entry,frame_rate_played_video,real_time_vec,frame_vec)for ii = 1:length(time_data_observation_entry) if isnan(time_data_observation_entry) continue end frame_id = floor(time_data_observation_entry*frame_rate_played_video); real_time = real_time_vec(ismember(frame_vec,frame_id)); endend
Best Answer