Asked by karthik kale
on 3 Aug 2019

syms t

f(t)=1/t;

t=2;

t=3;

f(3)-f(2)/3-2

disp(t)

Answer by Navya Seelam
on 6 Aug 2019

Edited by Navya Seelam
on 6 Aug 2019

Hi,

Do you want to find average rate or average? Method to find both is given below

syms t

f=@(t) 1./t;

tmin=2;

tmax=3;

average_rate=(f(3)-f(2))/(tmax-tmin) % average rate of f(t) with respect to t

average=integral(f,tmin,tmax)/(tmax-tmin) % average of f(t)

madhan ravi
on 6 Aug 2019

When t is defined as a function handle , why is there a need to define it as a symbolic variable?

Navya Seelam
on 6 Aug 2019

Yes it isn't required.

Sign in to comment.

Opportunities for recent engineering grads.

Apply Today
## 2 Comments

## Geoff Hayes (view profile)

## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/474721-if-f-t-1-t-find-the-average-rate-of-f-with-respect-to-t-over-the-intervals-from-t-2-to-t-3#comment_731488

## KALYAN ACHARJYA (view profile)

## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/474721-if-f-t-1-t-find-the-average-rate-of-f-with-respect-to-t-over-the-intervals-from-t-2-to-t-3#comment_731532

Sign in to comment.