tco1.PNG
greetings.
How do i plot the graph of A vesrs n for i varying from 3% to 12% in steps of 1% and n varying from 1 to 20. Where Ckwh=0.0001 and is a constant.Multiple graphs of A versus n in the same plot are required.
The result of the plot must look like the picutre below:
tco2.PNG

2 件のコメント

Alex Sune
Alex Sune 2019 年 6 月 10 日
What have you tried so far?
Tafadzwa Masocha
Tafadzwa Masocha 2019 年 6 月 11 日
n = 1:20;
Ckwh = 0.0001;
for x = 0.03:0.01:0.12
% A = (1./((x*(1+x).^n))).*((((1+x).^n)-1)*0.0001*8760);
A = (1./((x*(1+x).^n))).*((((1+x).^n)-1)*Ckwh*8760);
end
plot (n, A)
hold on

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

 採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 6 月 10 日

1 投票

Ckwh=0.0001;
n=1:2:20;
A=[];
for i=3:12
A=(((1+i).^n(:)-1)/(i*(1+i).^n(:)))*Ckwh*8760;
plot(n,A);
hold on;
end

5 件のコメント

Tafadzwa Masocha
Tafadzwa Masocha 2019 年 6 月 11 日
thanks, it worked
Tafadzwa Masocha
Tafadzwa Masocha 2019 年 6 月 11 日
now on the graph i want to continue and put a code that gives me a value of A when n=10 etc
madhan ravi
madhan ravi 2019 年 6 月 11 日
? Obviously homework.
KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 6 月 11 日
@ Tafadzwa Next part: Do it yourself, which is best way of learning.
Jan
Jan 2019 年 6 月 11 日
@Tafadzwa Masocha: If the original problem of this thread is solved, be so kind an mark the answer as "accepted". Thanks.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by