calculat the percentage of the red curve in the blue one?
1 回表示 (過去 30 日間)
古いコメントを表示
回答 (2 件)
Ajay Kumar
2020 年 3 月 5 日
編集済み: Ajay Kumar
2020 年 3 月 5 日
Do you mean exactly same values in red and blue lines? You can do:
same_values = find(blueline==redline); % gives same samples
percentage_of_red_in_blue = (100*numel(same_values))/numel(blueline); % gives percentage of red in blue
0 件のコメント
ME
2020 年 3 月 5 日
do you mean the ratio of the volumes under the lines? You can easily calculate it with
percentage_of_red_in_blue = 100 * sum(red) / sum(blue);
if both curves have the same discretised x-values
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Earth and Planetary Science についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!