{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 1: Introduction" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.1: Mass_difference_between_a_proton_and_a_neutron.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear \n", "clc\n", "disp('Exa-1.1');\n", "Mn=1.008665;Mp=1.007276 //Given mass of an electron and a proton in terms of u\n", "Md= Mn-Mp; //mass difference\n", "printf('Mass difference in terms of U is %f ',Md); \n", "Md=Md*931.50; //converting u into Mev/c^2 by multiplying by 931.5 MeV/c^2\n", "printf('which equals %.3f Mev/c^2.',Md);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.2: Total_mass_of_proton_and_electron.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear \n", "clc\n", "disp('Exa-1.2');\n", "Mp=1.007276 ; Me=5.4858*10^-4; //mass of proton and electron in terms of U\n", "Mt=Mp+Me; //Total mass= sum of above masses \n", "printf('The combined mass of an electron and a proton was found out to be %f U.',Mt);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.3: Value_of_hc.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clear \n", "clc\n", "disp('Exa-1.3');\n", "h=6.621*10^-34 ; c=2.9979*10^8; // h is in J/s and c is in m/s\n", "hc=h*c*((10^9)/(1.6022*10^-19)); //1e=1.602*10^-19 J and 1 m=10^9 nm\n", "printf('The value of hc is %f eV.nm\n',hc); \n", "printf('Rounding off to 4 digits, we obtain %4.f eV.nm.',hc);\n", "disp('Hence zero at the end is significant.');" ] } ], "metadata": { "kernelspec": { "display_name": "Scilab", "language": "scilab", "name": "scilab" }, "language_info": { "file_extension": ".sce", "help_links": [ { "text": "MetaKernel Magics", "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" } ], "mimetype": "text/x-octave", "name": "scilab", "version": "0.7.1" } }, "nbformat": 4, "nbformat_minor": 0 }