From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 2372/CH1/EX1.1/ex1.sce | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 2372/CH1/EX1.1/ex1.sce (limited to '2372/CH1') diff --git a/2372/CH1/EX1.1/ex1.sce b/2372/CH1/EX1.1/ex1.sce new file mode 100644 index 000000000..96ceeb59e --- /dev/null +++ b/2372/CH1/EX1.1/ex1.sce @@ -0,0 +1,35 @@ +clc; +clear; +data=[0 2 6; // column 1 and 2 for specifying the + 2 6 5; // time interval in hours + 6 9 10; // column 3 representing Load in MW + 9 12 15; + 12 14 12; + 14 16 14; + 16 18 16; + 18 20 18; + 20 22 16; + 22 23 12; + 23 24 6;]; +P=data(:,3); +Dt=data(:,2)-data(:,1); +W=P'*Dt; +Pavg=W/sum(Dt); +peak=max(P); +LF=Pavg/peak*100; +mprintf('avg load,Pavg=%4.2f MW\n',Pavg); +mprintf('Peak load,Peak=%3.1f MW\n',peak); +mprintf('load factor,LF=Pavg/Peak=%4.2f',LF); +r=1; +for(i=1:11) + x=data(i,1)+1; + y=data(i,2); + for(j=x:y) + bard(r)=data(i,3); + r=r+1; + end +end +bar(bard); +xlabel("Time(in hrs)-->"); +ylabel("Power,P(in MW)-->"); +title("Daily load cycle based on given data"); -- cgit