Why Matlab does not plot "for loop" generated vector?
이전 댓글 표시
I am quite a beginner and after hours of googling I just could not figure out why Matlab does not plot what needed. I can see only a blank.
My script is:
c = 7;
n=12;
for i = 0:1:n
u=i;
p_u = (2.3/c)*((u/c)^1.3)*exp(-(u/c)^2.3);
hours =8760*p_u*(1-0.09);
hold on;
plot(u, hours)
end
Thank you in advance!
채택된 답변
추가 답변 (1개)
Anne
2020년 2월 18일
0 개 추천
댓글 수: 1
Walter Roberson
2020년 2월 19일
You do not initialize power in this code.
카테고리
도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!