How do I find integral of a large function?

E = 0.5*M*u(:,3).^2 + 0.5*m*(u(:,3).^2+2*L*u(:,3).*u(:,4).*cos(u(:,2))) + ...
0.5*k* u(:,1).^2 + m*g*L*(1-cos(u(:,2)));
How i find integral of E(t) from 0 to 20

2 Comments

There does not appear to be any t in the expression to be integrated?
This is what confused me. I was given that E function and I was told to integrate.

Sign in to comment.

Answers (1)

A function, which is constant with respect to t, is integrated by multiplying its value by (tf - ti).
A = E * (tf - ti)
Does "I was told to integrate" really implies, that you have to use "t" as variable? Maybe you should integerate over u?

Categories

Find more on MATLAB in Help Center and File Exchange

Asked:

on 1 May 2021

Answered:

Jan
on 1 May 2021

Community Treasure Hunt

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

Start Hunting!