summaryrefslogtreecommitdiff
path: root/Digital_Communications_by_S_Sharma/10-ERROR_CONTROL_CODING.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Digital_Communications_by_S_Sharma/10-ERROR_CONTROL_CODING.ipynb')
-rw-r--r--Digital_Communications_by_S_Sharma/10-ERROR_CONTROL_CODING.ipynb142
1 files changed, 142 insertions, 0 deletions
diff --git a/Digital_Communications_by_S_Sharma/10-ERROR_CONTROL_CODING.ipynb b/Digital_Communications_by_S_Sharma/10-ERROR_CONTROL_CODING.ipynb
new file mode 100644
index 0000000..32b9445
--- /dev/null
+++ b/Digital_Communications_by_S_Sharma/10-ERROR_CONTROL_CODING.ipynb
@@ -0,0 +1,142 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10: ERROR CONTROL CODING"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.17: code_vectors.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Caption: code vectors\n",
+"//Example 10.17\n",
+"//page no 498\n",
+"//Determine all possible code vectors \n",
+"clc;\n",
+"clear;\n",
+"m3=1;\n",
+"m2=0;\n",
+"m1=1;\n",
+"m0=0;\n",
+"//M=Message Matrix\n",
+"//G=Generator Matrix\n",
+"G=[1 0 1 1 0 0 0;0 1 0 1 1 0 0;0 0 1 0 1 1 0;0 0 0 1 0 1 1];\n",
+"M=[m3 m2 m1 m0;];\n",
+"X=M*G;\n",
+"for i=1:7;\n",
+" if X(i)>1\n",
+" X(i)=0\n",
+" end\n",
+" end\n",
+"disp(X,'The code vectors are ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.19: code_word.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Caption: code word\n",
+"//Example 10.19\n",
+"//page no 501\n",
+"//Determine code word \n",
+"clc;\n",
+"clear;\n",
+"m3=1;\n",
+"m2=0;\n",
+"m1=1;\n",
+"m0=0;\n",
+"//M=Message Matrix\n",
+"//G=Generator Matrix\n",
+"G=[1 0 0 0 1 0 1;0 1 0 0 1 1 1;0 0 1 0 1 1 0;0 0 0 1 0 1 1];\n",
+"M=[m3 m2 m1 m0;];\n",
+"X=M*G;\n",
+"for i=1:7;\n",
+" if X(i)>1\n",
+" X(i)=0\n",
+" end\n",
+" end\n",
+"disp(X,'The required code word ');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.4: errors_and_corrected_errors.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Caption: errors,corrected errors\n",
+"//Example 10.4\n",
+"//page no 464\n",
+"//Find detected errors,corrected errors\n",
+"clear;\n",
+"clc;\n",
+"dmin=5\n",
+" // (s+1)<= dmin number errors can be detected(s)\n",
+" s=dmin-1;\n",
+"printf(' i)Number of detected errors \n\n \t s <= %d ',s );\n",
+"//(2t+1)<=dmin number errors can be corrected(t)\n",
+"t=(dmin-1)/2;\n",
+"\n",
+"printf('\n\n ii) Number of corrected errors\n\n \t t<= %d ',t );"
+ ]
+ }
+],
+"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
+}