From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1994/CH1/EX1.4/Example1_4.sce | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 1994/CH1/EX1.4/Example1_4.sce (limited to '1994/CH1/EX1.4/Example1_4.sce') diff --git a/1994/CH1/EX1.4/Example1_4.sce b/1994/CH1/EX1.4/Example1_4.sce new file mode 100755 index 000000000..3f6a59ed6 --- /dev/null +++ b/1994/CH1/EX1.4/Example1_4.sce @@ -0,0 +1,18 @@ +//Chapter-1,Example1_4,pg 1_20 +A=50 +T=2 +function E=f(t),E=(50*t)^2,endfunction//e=At(ramp function) +exact=-2.5432596188; +I=intg(0,T,f) +abs(exact-I) +Erms=sqrt((1/T)*I) +function e=f1(t),e=50*t,//e=At(ramp function) +endfunction +exact=-2.5432596188; +I1=intg(0,T,f) +Eav=(1/T)*I1 +Kf=Erms/Eav +kf1=0.961//Kf(sine)/Kf(sawtooth) +pere=(1-kf1)/1*100//percentage error +printf("percentage error ") +printf("pere=%.2f ",pere) -- cgit