integrate two vectors of data

Hi all
I have two vectors of data. They are the same length. I want to multiply them and integrate over a distance. How can I do this in MATLAB?
I saw many people asking the same question and no answer. Does it mean it cannot be done in MATLAB?!

 Risposta accettata

KSSV
KSSV il 29 Nov 2016

0 voti

doc trapz.

3 Commenti

omnia
omnia il 29 Nov 2016
let me explain my purpose in a better way. I have a matrix 'p' of 300*300 drawn over x and y. So I have 2D plot of p. I want to integrate this p over x and y and then plot the resultant 300*300 matrix.
Trapz gives only one value!
omnia
omnia il 29 Nov 2016
Never mind. You are right. I got my value now
KSSV
KSSV il 29 Nov 2016
cool....you got it..

Accedi per commentare.

Più risposte (0)

Richiesto:

il 29 Nov 2016

Commentato:

il 29 Nov 2016

Community Treasure Hunt

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

Start Hunting!

Translated by