answersLogoWhite

0


Best Answer

Yes.

Let us use an example:

x=1:10; % Data Set

z=1:20; % Range

y=x^2; % Equation

equation1=trapz(y,z) % This will integrate y over the range of z for your data

When integrating over a matrix:

x2=[ 1 2 3; 4 5 6]; % Matrix

y2=x*C; % Where c is any variable

equation2=trapz(y2);

% Will integrate over every column of your matrix and give you an array.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can you use trapz command in matlab to integrate a matrix?
Write your answer...
Submit
Still have questions?
magnify glass
imp