how can I plotting one over other?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
lina
am 2 Jul. 2015
Kommentiert: Walter Roberson
am 3 Jul. 2015
hi all the attached figure is contains of 2 curves, those are which I want to plot them over each other by using statistical way (mean) how should I do that? thank you in advance.
3 Kommentare
Akzeptierte Antwort
Walter Roberson
am 2 Jul. 2015
all_x = unique([blue_x, red_x]);
in_common_range = min(blue_x) <= all_x & all_x <= max(blue_x) & min(red_x) <= all_x & all_x <= max(red_x);
common_x = all_x(in_common_range);
blue_projected = interp1(blue_x, blue_y, common_x);
red_projected = interp1(red_x, red_y, common_x);
mean_x = (blue_projected + red_projected)./2;
plot(common_x, mean_x, 'g')
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Annotations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!