How do you graph this function?

19 ビュー (過去 30 日間)
Nitishsai Nandineni
Nitishsai Nandineni 2019 年 11 月 13 日
回答済み: JESUS DAVID ARIZA ROYETH 2019 年 11 月 13 日
How do I graph (x,y) for the following information:
x[1]=10
x[2]=20
x[3]=30
x[4]=40
x[5]=50
x[6]=60
and so on
and
y[n]=(x[n]+x[n-1])*1/2
y[1]=(10+0)*1/2=5
y[2]=(20+10)*1/2=15

採用された回答

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2019 年 11 月 13 日
solution:
n=10;
x=10:n:60;
y=(x+(x-n))*1/2;
figure;
plot(x,y,'r*-')

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by