How to merge data from different time line?
Show older comments
Hello,
I want to merge the two data into one. But as they are in two different time thats why I cannot just combine them.
I need to add them by keeping the time as it is.
How can I do this?

data_1_y_axes=[0,1,3,5,4,6,8,9,7]
time_1_x_axes=[.02,0.03,.05,.06,.07,0.08,0.09,.1,.2]
data_2_y_axes=[0,2,4,5,2,7,5,7,5]
time_2_x_axes=[.002,0.004,.006,.009,.02,0.04,0.06,.07,.09]
plot(time_1_x_axes,data_1_y_axes)
hold on
plot(time_2_x_axes,data_2_y_axes)
Answers (1)
KALYAN ACHARJYA
on 23 Jan 2021
Is that?
merge_t=sort([time_1_x_axes,time_2_x_axes]);
new_t=merge_t(1:2:end);
3 Comments
KALYAN ACHARJYA
on 23 Jan 2021
Edited: KALYAN ACHARJYA
on 23 Jan 2021
All experts, need your validation, is this okay or have I messed with the data?
Tania Islam
on 25 Jan 2021
Tania Islam
on 25 Jan 2021
Categories
Find more on Subplots 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!