how can I plotting one over other?

1 回表示 (過去 30 日間)
lina
lina 2015 年 7 月 2 日
コメント済み: Walter Roberson 2015 年 7 月 3 日
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 件のコメント
lina
lina 2015 年 7 月 2 日
I attached it right now
lina
lina 2015 年 7 月 2 日
i attached it right now

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2015 年 7 月 2 日
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 件のコメント
lina
lina 2015 年 7 月 3 日
>> x = unique([out(:,6),pred(:,1)]); ??? Error using ==> horzcat CAT arguments dimensions are not consistent.
I get this error
Walter Roberson
Walter Roberson 2015 年 7 月 3 日
all_x = unique([out(:,6); pred(:,1)]);

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDiscrete Data Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by