if f(t)=1/t find the average rate of f with respect to t over the intervals from t=2 to t=3
조회 수: 4 (최근 30일)
이전 댓글 표시
syms t
f(t)=1/t;
t=2;
t=3;
f(3)-f(2)/3-2
disp(t)
댓글 수: 2
Geoff Hayes
2019년 8월 3일
karthik - what exactly is your question? Why do you have this line of code
f(3)-f(2)/3-2
? Is this supposed to be your average (though isn't being assigned to anything)? Be careful here...you may want to add some brackets around the numerator and denominator...
KALYAN ACHARJYA
2019년 8월 3일
편집: KALYAN ACHARJYA
2019년 8월 3일
Is this?
syms t
f(t)=1/t;
t=2;
t=3;
ft_averg=(f(3)-f(2))/(3-2);
disp(ft_averg);
답변 (1개)
Navya Seelam
2019년 8월 6일
편집: Navya Seelam
2019년 8월 6일
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)
댓글 수: 2
madhan ravi
2019년 8월 6일
When t is defined as a function handle , why is there a need to define it as a symbolic variable?
참고 항목
카테고리
Help Center 및 File Exchange에서 Numbers and Precision에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!