Area between two curves that plotted by importing datapoints

1 visualización (últimos 30 días)
friet
friet el 20 de Jun. de 2020
Comentada: KSSV el 21 de Jun. de 2020
Hello
I have two curves imported from excel and ploted as shown in the figure below. How can I calculate the red area between the two curves. And also it is possible to assigned a color in the area.
clc
close all
clear all
a=xlsread('D:\Folder.xlsx','Sheet1','A1:A237');
b=xlsread('D:\Folder.xlsx','Sheet1','B1:B237');
x=linspace(80,250,237);
y = zeros(237,1);
y(:)=0.1465;
plot(x,y,a,b)
  4 comentarios
Walter Roberson
Walter Roberson el 21 de Jun. de 2020
mask = -0.3 <= x & x <= 3.3;
trapz(t1(mask))

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Data Distribution Plots 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