Need help with average rate of change.

How do I calculate the average rate of change with this as my function:
function y = W(x) if 1 <= x && x <= 28 y = 48+3.64*x+0.6363*x.^2+0.00963*x.^3; end if x>28 && x<=56 y =-1004+65.8*x; end

5 件のコメント

sixwwwwww
sixwwwwww 2013 年 10 月 11 日
What actually you want to do? Because your function consists of polynomial equations in two if conditions. Can you explain briefly?
Alexander
Alexander 2013 年 10 月 11 日
I need to create an m-file that will calculate the average rate of change of W over a time interval. We were given the piece wise function:
W(t) = 48+3.64t+0.6363t^2+0.00963t^3 when 1 <= t <= 28 W(t) = -1004+65.8t when 28 < t <= 56
Lauren
Lauren 2013 年 10 月 11 日
May I talk to you via e-mail or something?
Jan
Jan 2013 年 10 月 11 日
@Lauren: It is the nature of a public forum to let all readers participate from solutions. Therefore some users do not discuss via emails.
Alexander
Alexander 2013 年 10 月 11 日
@Lauren, sure.

サインインしてコメントする。

回答 (1 件)

Youssef  Khmou
Youssef Khmou 2013 年 10 月 11 日
編集済み: Youssef Khmou 2013 年 10 月 11 日

0 投票

Alexander, in the range [1 28], the average rate is : 48+3x²+x(2b+3)+h²+a and in the range [28 56] it is : B, with a=3.64, b=0.6363, c=0.00096, and B=65.8.
Verify this using the general formula DY/DX=(F(X+H)-F(X))/H

4 件のコメント

Alexander
Alexander 2013 年 10 月 11 日
I'm new to matlab, how would I type this in to get the m-file?
Youssef  Khmou
Youssef Khmou 2013 年 10 月 11 日
you can visualize your function very fast using the command fplot :
>>fplot('48+3.64*x+0.6363*x.^2+0.00963*x.^3',[1 28])
>>figure,
>>fplot('-1004+65.8*x',[28 56])
The calculus above are made by theoretically, verify them , and then all you need is replace with boundaries 1 28 56 :
Alexander
Alexander 2013 年 10 月 11 日
Okay, and if I wanted to find the average change from say t=1 to t=25, how would I do that?
Youssef  Khmou
Youssef Khmou 2013 年 10 月 11 日
then the (h,x) in the formula are x=1, and h=x2-x1=24

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeMultidimensional Arrays についてさらに検索

質問済み:

2013 年 10 月 11 日

コメント済み:

2013 年 10 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by