Borrar filtros
Borrar filtros

calculat the percentage of the red curve in the blue one?

3 visualizaciones (últimos 30 días)
nihed sboui
nihed sboui el 5 de Mzo. de 2020
Respondida: ME el 5 de Mzo. de 2020

Respuestas (2)

Ajay Kumar
Ajay Kumar el 5 de Mzo. de 2020
Editada: Ajay Kumar el 5 de Mzo. de 2020
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

ME
ME el 5 de Mzo. de 2020
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

Categorías

Más información sobre Particle & Nuclear Physics en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by