How do I form a product of two arrays and add the numerical value of the integral in the plot?

1 Ansicht (letzte 30 Tage)
xDataA = linspace(0,4*pi,1024);
yDataA = cos(xDataA);
xDataB = linspace(0,4*pi,1024);
yDataB = cos(xDataB);
I have two arrays here and I want to plot the product and add the numerical value of the integral in the plot.

Akzeptierte Antwort

KSSV
KSSV am 12 Feb. 2019
Bearbeitet: KSSV am 12 Feb. 2019
xData = linspace(0,4*pi,1024);
yDataA = cos(xData);
yDataB = cos(xData);
p = yDataA.*yDataB ;
plot(xData,p)

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by