Two variable has the same array of 1 but the code show error

self_suf=Production./T_Consumption;%self sufficiency
days_a50=sum(self_suf>0.5);%days with self sufficency above 50%
avg_production=mean(Production(self_suf>0,5));%average production of energy from those days
date=0:1505;% from previous figure(1) total of 1506 days
figure(2)
plot(date,self_suf,'b');% plot date vs self sufficiecy along the period
hold on
plot(0.5,'r--','50 Self Sufficiency');% the horizontal line of 50% self sufficienncy
xlabel('Date from(06/04/20 to 19/05/24)');
ylabel('self sufficiency');
tittle('self suuficiency over time');
gird on
above is the code

 採用された回答

Voss
Voss 2024 年 10 月 1 日

1 投票

0,5 should be 0.5

2 件のコメント

Elisa
Elisa 2024 年 10 月 1 日
omg, i am so dumb, but thank you very much!
Voss
Voss 2024 年 10 月 1 日
編集済み: Voss 2024 年 10 月 1 日
You're welcome! Any questions, let me know.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDates and Time についてさらに検索

タグ

質問済み:

2024 年 10 月 1 日

編集済み:

2024 年 10 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by