calculat the percentage of the red curve in the blue one?
2 次查看(过去 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!