From f35ea80659b6a49d1bb2ce1d7d002583f3f40947 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:38:01 +0530 Subject: updated the code --- 3411/CH6/EX6.1.u1/Ex6_1_u1.sce | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to '3411/CH6/EX6.1.u1') diff --git a/3411/CH6/EX6.1.u1/Ex6_1_u1.sce b/3411/CH6/EX6.1.u1/Ex6_1_u1.sce index e98cf65d8..0892939b0 100644 --- a/3411/CH6/EX6.1.u1/Ex6_1_u1.sce +++ b/3411/CH6/EX6.1.u1/Ex6_1_u1.sce @@ -2,10 +2,14 @@ clc(); clear; //To calculate the Electric field of a laser beam -i=10^-3/(3*10^-6) //units in W/mts^2 -c=3*10^8 //units in mts/sec +power=1 //units in milli Watts +power=power*10^-3 //units in Watts +area=3 //units in milli meter^2 +area=area*10^-6 //units in meter^2 +i=power/area // units in Watts/meter^2 +c=3*10^8 //units in meter/sec u=4*10^-7 //units in SI n=1 -E0=sqrt((i*2*c*u)/n) //units in V/mts +E0=sqrt((i*2*c*u)/n) //units in V/meters printf("The electric field is E0=%.2f V/m",E0) //In text book answer is given E0=501 V/m but the correct answer is E0=282.84 V/m -- cgit