--> //initializations

--> d=0.1 //mm (diameter of capillary tube)
 d  = 

   0.1


--> Ts=0.075 //N/m (surface tension)
 Ts  = 

   0.075


--> x=10 //degree (wetting angle)
 x  = 

   10.


--> g=9.81 //
 g  = 

   9.81


--> Yw=1000 //N/m^3 (unit weight of water)
 Yw  = 

   1000.


--> //calculations

--> D=d/1000 //(diameter of capillary tube)
 D  = 

   0.0001


--> hc=(4*Ts*(cosd(x)))/(g*Yw*D) //(height of capillary rise)
 hc  = 

   0.3011645


--> Np=(Yw*hc*g)/1000 //(negative pressure)
 Np  = 

   2.9544233


--> //results

--> printf('negative pressure in water=%f',Np) //KN/m^2
negative pressure in water=2.954423