diff options
author | prashantsinalkar | 2020-04-14 10:19:27 +0530 |
---|---|---|
committer | prashantsinalkar | 2020-04-14 10:23:54 +0530 |
commit | 476705d693c7122d34f9b049fa79b935405c9b49 (patch) | |
tree | 2b1df110e24ff0174830d7f825f43ff1c134d1af /Analog_and_Digital_Communication_by_S_Sharma | |
parent | abb52650288b08a680335531742a7126ad0fb846 (diff) | |
download | all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.gz all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.bz2 all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.zip |
Initial commit
Diffstat (limited to 'Analog_and_Digital_Communication_by_S_Sharma')
9 files changed, 425 insertions, 0 deletions
diff --git a/Analog_and_Digital_Communication_by_S_Sharma/10-Digital_multiplexers.ipynb b/Analog_and_Digital_Communication_by_S_Sharma/10-Digital_multiplexers.ipynb new file mode 100644 index 0000000..1f2f85a --- /dev/null +++ b/Analog_and_Digital_Communication_by_S_Sharma/10-Digital_multiplexers.ipynb @@ -0,0 +1,32 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Digital multiplexers" + ] + }, +], +"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 +} diff --git a/Analog_and_Digital_Communication_by_S_Sharma/11-Information_Theory.ipynb b/Analog_and_Digital_Communication_by_S_Sharma/11-Information_Theory.ipynb new file mode 100644 index 0000000..7e29fd1 --- /dev/null +++ b/Analog_and_Digital_Communication_by_S_Sharma/11-Information_Theory.ipynb @@ -0,0 +1,169 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: Information Theory" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.20: channel_matrix_and_probabilities.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ANALOG AND DIGITAL COMMUNICATION\n", +"//BY Dr.SANJAY SHARMA\n", +"//CHAPTER 11\n", +"//Information Theory\n", +"clear all;\n", +"clc;\n", +"printf('EXAMPLE 11.20(PAGENO 503)');\n", +"//given\n", +"P_X = [.5 .5]//x matrix\n", +"\n", +"//calculations\n", +"P_YX = [.9 .1; .2 .8];//yx matrix representation of given fig\n", +"P_ZY = [.9 .1; .2 .8]//zy matrix representation of given fig\n", +"P_Y = P_X *P_YX//y matrix\n", +"P_ZX = P_YX * P_ZY//zx matrix\n", +"P_Z = P_X *P_ZX//z matrix\n", +"\n", +"\n", +"//results\n", +"printf('\n\ni.Channel matrix of the channelP_ZX ');\n", +"disp(P_ZX);\n", +"printf('Matrix P(Z)')\n", +"disp(P_Z);\n", +"printf('\n\na.P(Z1) = %.2f',P_Z(1,1));\n", +"printf('\n\nb.P(Z2) = %.2f',P_Z(1,2));\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.46: efficiency_of_shannon_fano_code_and_huffman_code.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ANALOG AND DIGITAL COMMUNICATION\n", +"//BY Dr.SANJAY SHARMA\n", +"//CHAPTER 11\n", +"//Information Theory\n", +"clear all;\n", +"clc;\n", +"printf('EXAMPLE 11.46(PAGENO 532)');\n", +"\n", +"//given\n", +"P_x1 = .4//probability of first signal\n", +"P_x2 = .19//probability of second signal\n", +"P_x3 = .16//probability of third signal\n", +"P_x4 = .15//probability of fourth signal\n", +"P_x5 = .1//probability of fifth signal\n", +"n1 = 1//number of bits in code obtained from table givenn textbook\n", +"n2 = 2//number of bits in code obtained from table givenn textbook\n", +"n3 = 2//number of bits in code obtained from table givenn textbook\n", +"n4 = 3//number of bits in code obtained from table givenn textbook\n", +"n5 = 3//number of bits in code obtained from table givenn textbook\n", +"\n", +"//calculations\n", +"I_x1 = -log2(P_x1);\n", +"I_x2 = -log2(P_x2);\n", +"I_x3 = -log2(P_x3);\n", +"I_x4 = -log2(P_x4);\n", +"I_x5 = -log2(P_x5);\n", +"H_x = P_x1*I_x1 + P_x2*I_x2 + P_x3*I_x3 + P_x4*I_x4 + P_x5*I_x5;//entropy\n", +"L1 = P_x1*n1 + P_x2*n2 + P_x3*n3 + P_x4*n4 + P_x5*n5;\n", +"neta1 = H_x/L1;\n", +"P_neta1 = neta1*100//efficiency in percentage using Shannon Fano code\n", +"L2 = P_x1*1 + (P_x2 + P_x3 +P_x4 +P_x5 )*3\n", +"neta2 = H_x/L2;\n", +"P_neta2 = neta2*100//efficiency in percentage using huffman code\n", +"\n", +"//results\n", +"printf('\n\nEfficiency in percentage using Shannon Fano code = %2f percent',P_neta1)\n", +"printf('\n\nEfficiency in percentage using huffman code = %2f percent',P_neta2)\n", +"printf('\n\nNote: There is mistake in the textbook in calculation of L using SHannon Fano code')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.4: amount_of_information_content_wrt_to_binary_PCMs.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//ANALOG AND DIGITAL COMMUNICATION\n", +"//BY Dr.SANJAY SHARMA\n", +"//CHAPTER 11\n", +"//Information Theory\n", +"clear all;\n", +"clc;\n", +"printf('EXAMPLE 11.4(PAGENO 489)');\n", +"//given\n", +"Px_1 = 1/4//probability wrt to binary PCM '0'\n", +"Px_2 = 3/4//probability wrt to binary PCM '1'\n", +"\n", +"//calculations\n", +"Ix_1 = log2(1/Px_1)//amount of information of zero level with base 2\n", +"Ix_2 = log2(1/Px_2)//amount of information of first level with base 2\n", +"Ix_1= log(1/Px_1)/log(2)//amount of information content with base 10\n", +"Ix_2= log(1/Px_2)/log(2)//amount of information content with base 10\n", +"\n", +"//results\n", +"printf('\n\ni.Amount of information carried wrt to binary PCM 0 = %.2f bits',Ix_1);\n", +"printf('\n\nii.Amount of information carried wrt to binary PCM 1 = %.2f bits',Ix_2);" + ] + } +], +"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 +} diff --git a/Analog_and_Digital_Communication_by_S_Sharma/2-Amplitude_Modulation.ipynb b/Analog_and_Digital_Communication_by_S_Sharma/2-Amplitude_Modulation.ipynb new file mode 100644 index 0000000..88e8256 --- /dev/null +++ b/Analog_and_Digital_Communication_by_S_Sharma/2-Amplitude_Modulation.ipynb @@ -0,0 +1,32 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Amplitude Modulation" + ] + }, +], +"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 +} diff --git a/Analog_and_Digital_Communication_by_S_Sharma/3-Radio_Transmitters.ipynb b/Analog_and_Digital_Communication_by_S_Sharma/3-Radio_Transmitters.ipynb new file mode 100644 index 0000000..6303d40 --- /dev/null +++ b/Analog_and_Digital_Communication_by_S_Sharma/3-Radio_Transmitters.ipynb @@ -0,0 +1,32 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Radio Transmitters" + ] + }, +], +"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 +} diff --git a/Analog_and_Digital_Communication_by_S_Sharma/4-Radio_Receivers.ipynb b/Analog_and_Digital_Communication_by_S_Sharma/4-Radio_Receivers.ipynb new file mode 100644 index 0000000..deea21e --- /dev/null +++ b/Analog_and_Digital_Communication_by_S_Sharma/4-Radio_Receivers.ipynb @@ -0,0 +1,32 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Radio Receivers" + ] + }, +], +"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 +} diff --git a/Analog_and_Digital_Communication_by_S_Sharma/5-Angle_Modulation.ipynb b/Analog_and_Digital_Communication_by_S_Sharma/5-Angle_Modulation.ipynb new file mode 100644 index 0000000..b230204 --- /dev/null +++ b/Analog_and_Digital_Communication_by_S_Sharma/5-Angle_Modulation.ipynb @@ -0,0 +1,32 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Angle Modulation" + ] + }, +], +"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 +} diff --git a/Analog_and_Digital_Communication_by_S_Sharma/6-Noise.ipynb b/Analog_and_Digital_Communication_by_S_Sharma/6-Noise.ipynb new file mode 100644 index 0000000..e39c84b --- /dev/null +++ b/Analog_and_Digital_Communication_by_S_Sharma/6-Noise.ipynb @@ -0,0 +1,32 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Noise" + ] + }, +], +"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 +} diff --git a/Analog_and_Digital_Communication_by_S_Sharma/7-Sampling_Theory_and_Pulse_Modulation.ipynb b/Analog_and_Digital_Communication_by_S_Sharma/7-Sampling_Theory_and_Pulse_Modulation.ipynb new file mode 100644 index 0000000..2681c2a --- /dev/null +++ b/Analog_and_Digital_Communication_by_S_Sharma/7-Sampling_Theory_and_Pulse_Modulation.ipynb @@ -0,0 +1,32 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: Sampling Theory and Pulse Modulation" + ] + }, +], +"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 +} diff --git a/Analog_and_Digital_Communication_by_S_Sharma/8-Waveform_Coding_Techniques.ipynb b/Analog_and_Digital_Communication_by_S_Sharma/8-Waveform_Coding_Techniques.ipynb new file mode 100644 index 0000000..ebf5898 --- /dev/null +++ b/Analog_and_Digital_Communication_by_S_Sharma/8-Waveform_Coding_Techniques.ipynb @@ -0,0 +1,32 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Waveform Coding Techniques" + ] + }, +], +"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 +} |