From d1e070fe2d77c8e7f6ba4b0c57b1b42e26349059 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Sat, 3 Feb 2018 10:59:42 +0530 Subject: Modified the code --- 3819/CH2/EX2.16/Ex2_16.sce | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to '3819/CH2') diff --git a/3819/CH2/EX2.16/Ex2_16.sce b/3819/CH2/EX2.16/Ex2_16.sce index fed514567..c310ce216 100644 --- a/3819/CH2/EX2.16/Ex2_16.sce +++ b/3819/CH2/EX2.16/Ex2_16.sce @@ -12,12 +12,10 @@ dens2=sg2*1000 //calculations pA=1*10^4*g pB=1.8*10^4*g -//pressure above X-X in left limb is; -p_left=13.6*1000*g*h+dens1*g*(2+3)+pA -p_right=dens2*g*(h+2)+pB +//pressure above X-X in left limb is p_left=13.6*1000*g*h+dens1*g*(2+3)+pA and p_right=dens2*g*(h+2)+p function [f]=F(h) f=13.6*1000*g*h+dens1*g*(2+3)+pA-(dens2*g*(h+2)+pB) endfunction -h=10; -h=fsolve(h,F) +h0=10; +h=fsolve(h0,F) mprintf("\nTHE DIFFERENCE IN MERCURY LEVELS IS %f cm\n",h*100) -- cgit