Homework Solution: The: of his assignment is to rev: abilities and properties of Matlab prepare for writing code in EmbeddedC. You sh…

    TheM-s : of his signment is to revir.trbsi.;., abilities and properties ofMatlatné prepare for writing code in Embeddedc. You Plan your solutions (eg, HW02-1 and HWO2-3) o Document your plan for each solution using a flowchart or pseudo-codc. o Submit each plan as a separate file (HW02-Lio, or Hw02-1 쮸t, or HW02-1.txt. etc.). Document each Matlab function (e.g, HW02-2 and HW02-4) before your enter it and as you debug it Use Matlab comments as needed. The comments should explain the meaning or usage of variables and major sections of code、 Line-by-line comments may not be complotely nooossary. Include the ENGRI 1 1/ENGR 1 12 Script Standard Header at the beginning of each Matlab file as listed below: Submit each Matlab faction as a separate file (Hwo 2-2皿etc.). Document the proper operation of each Matlab function (e.g, HW0Z-2 and HW02-4) after you are have verified it is working as expected Capture a sample of the actual output of each Matlab function (displayed in the Matlab command window). Submit a sample of the actual output of cach Matlab function as a scparate file くHW02-2tesLtxt or HW02.2test.pdf, etc.). o o HW02-1 Develop an algorithm which generates an infinieloop and turns ONi.e. Truc, Hi, or Logic 1)a Boolcan Variable, LEDI, once every fourth iseration. Wirite a flowchart Matlab script which gencrates an infinite loop in Matlab Document this algorithm using a lowchart or pseudo-code . o For a flowchart, use an online tool such as draw.io (or powerpoint). Hand- written drawings (sketches) are permitted for In-Class Activitics (for time/expediency) but ARE NOT acceptable for this HW assignment o For pseudo-code, use a simple text file and standard pseudo-code protocol. Use the variable names specified and document (cxplain) any additional variables. Submit this plan as a separate file (HW02-io, or HW02-1.ppt, or HW02-1.xt, ctc.) - HW02-2 Write a Matlab function which implements the algorithm developed in HW2-1 Deeumont this function with Matlab comments. This will help you when you implement this algorithm in other programming languages, such as EmbeddedC Submit this Matlab funetion as a separate file (HW02-2m) Capture the 5-10 lines of actual output of this function to demonstrate its correct operation. Save this output as a text file or pdf file (coeverted from an image). . Subenit this output as a separate file (HW02-2.txt or HW02-2 pdf HW02-3 Develop an algorithm which generates an infinite loop and turns ON (ie. True. Hi, or Logic 1) Boolean variable, LED1, for three iterations, then OFF for five iterations. Here is an abbreviated trace table of the expectod output: ON OFF ON OFF 9, 10, 11 3, 14, 15, 16 . Document this algorithm using a flowchart or pscudo-code (as for HW02-1) . Use the variable names specifiod and document (explain) any additional variables . Subemit this plan as a separate file (HW02-3ia, or HWO2-3.ppt, or Hw/02-3.txt, etc). HW02-4 Write a Matlab function which implements the algorithm devcloped in HW023. .Document this function with Matlab comments. This will help you when you implem this algorithm in other programming languages, such as EmbeddedC Submit this Matlab function as a separate file (HW02-4.m) .Capture the 10-15 lines of actual output of this function to demonstrate its correct operation. Save this output as a text file or pdf file (converted from an image). .Submit this output as a separate file (HW02-4.txt or HW02-4 pd
    The: of his assignment is to rev: abilities and properties of Matlab prepare for writing code in EmbeddedC. You should: Plan your solutions (eg., HW02-1 and HW02-3) Document your plan for each solution using a flowchart or pseudo-code. Submit each plan as a separate file (HW02-1, io, or Hw02-1 ppt, or HW02-1.txt. etc.). Document each Matlab function (e.g., HW02-2 and HW02-4) before your enter it and as you debug it Use Matlab comments as needed. The comments should explain the meaning or usage of variables and major sections of code. Line-by-line comments may not be completely necessary. Include the "ENGR111/ENGR112 Script Standard Header" at the beginning of each Matlab file as listed below: Submit each Matlab faction as a separate file (Hwo 2-2m etc.). Document the proper operation of each Matlab function (e.g, HW02-2 and HW02-4) after you are have verified it is working as expected Capture a sample of the actual output of each Matlab function (displayed in the Matlab command window). Submit a sample of the actual output of each Matlab function as a separate file (HW02-2test.txt or HW02.2test.pdf, etc.).

    Expert Answer

    TheM-s : of his signment is to revir.trbsi.;., abilities and personalties ofMatlatné just restraint communication sequence in Embeddedc. You Guile your exculpations (eg, HW02-1 and HWO2-3) o Muniment your guile restraint each exculpation using a flowchart or pseudo-codc. o Submit each guile as a disconnected smooth (HW02-Lio, or Hw02-1 쮸t, or HW02-1.txt. absence of wonder.). Muniment each Matlab employment (e.g, HW02-2 and HW02-4) antecedently your invade it and as you debug it Representation Matlab comments as needed. The comments should interpret the import or exercitation of shiftings and greater sections of sequence、 Line-by-line comments may referable attribuconsultation attribuconsultation attribuconsultation be complotely nooossary. Include the ENGRI 1 1/ENGR 1 12 Script Rule Header at the inception of each Matlab smooth as listed below: Submit each Matlab conspiracy as a disconnected smooth (Hwo 2-2皿etc.). Muniment the personal agency of each Matlab employment (e.g, HW0Z-2 and HW02-4) following you are possess attested it is instituted as expected Capture a case of the express output of each Matlab employment (displayed in the Matlab instruct window). Submit a case of the express output of cach Matlab employment as a scparate smooth くHW02-2tesLtxt or HW02.2test.pdf, absence of wonder.). o o HW02-1 Develop an algorithm which generates an infinieloop and turns ONi.e. Truc, Hi, or Logic 1)a Boolcan Shifting, LEDI, once full fourth iseration. Wirite a flowchart Matlab script which gencrates an infinite loop in Matlab Muniment this algorithm using a lowchart or pseudo-sequence . o Restraint a flowchart, representation an online utensil such as describe.io (or powerpoint). Hand- written describeings (sketches) are liberal restraint In-Class Activitics (restraint time/expediency) beside ARE NOT delicious restraint this HW enactment o Restraint pseudo-code, representation a lowly citation smooth and rule pseudo-sequence protocol. Representation the shifting names definitive and muniment (cxplain) any affixed shiftings. Submit this guile as a disconnected smooth (HW02-io, or HW02-1.ppt, or HW02-1.xt, ctc.) - HW02-2 Write a Matlab employment which utensils the algorithm patent clear in HW2-1 Deeumont this employment with Matlab comments. This conquer acceleration you when you utensil this algorithm in other programming languages, such as EmbeddedC Submit this Matlab funetion as a disconnected smooth (HW02-2m) Capture the 5-10 lines of express output of this employment to unfold its punish agency. Save this output as a citation smooth or pdf smooth (coeverted from an metaphor). . Subenit this output as a disconnected smooth (HW02-2.txt or HW02-2 pdf HW02-3 Develop an algorithm which generates an infinite loop and turns ON (ie. True. Hi, or Logic 1) Boolean shifting, LED1, restraint three repetitions, then OFF restraint five repetitions. Here is an abbreviated investigate consultation of the expectod output: ON OFF ON OFF 9, 10, 11 3, 14, 15, 16 . Muniment this algorithm using a flowchart or pscudo-sequence (as restraint HW02-1) . Representation the shifting names specifiod and muniment (explain) any affixed shiftings . Subemit this guile as a disconnected smooth (HW02-3ia, or HWO2-3.ppt, or Hw/02-3.txt, absence of wonder). HW02-4 Write a Matlab employment which utensils the algorithm devcloped in HW023. .Muniment this employment with Matlab comments. This conquer acceleration you when you implem this algorithm in other programming languages, such as EmbeddedC Submit this Matlab employment as a disconnected smooth (HW02-4.m) .Capture the 10-15 lines of express output of this employment to unfold its punish agency. Save this output as a citation smooth or pdf smooth (converted from an metaphor). .Submit this output as a disconnected smooth (HW02-4.txt or HW02-4 pd

    The: of his enactment is to rev: abilities and personalties of Matlab just restraint communication sequence in EmbeddedC. You should: Guile your exculpations (eg., HW02-1 and HW02-3) Muniment your guile restraint each exculpation using a flowchart or pseudo-code. Submit each guile as a disconnected smooth (HW02-1, io, or Hw02-1 ppt, or HW02-1.txt. absence of wonder.). Muniment each Matlab employment (e.g., HW02-2 and HW02-4) antecedently your invade it and as you debug it Representation Matlab comments as needed. The comments should interpret the import or exercitation of shiftings and greater sections of sequence. Line-by-line comments may referable attribuconsultation attribuconsultation attribuconsultation be altogether needful. Include the “ENGR111/ENGR112 Script Rule Header” at the inception of each Matlab smooth as listed below: Submit each Matlab conspiracy as a disconnected smooth (Hwo 2-2m absence of wonder.). Muniment the personal agency of each Matlab employment (e.g, HW02-2 and HW02-4) following you are possess attested it is instituted as expected Capture a case of the express output of each Matlab employment (displayed in the Matlab instruct window). Submit a case of the express output of each Matlab employment as a disconnected smooth (HW02-2test.txt or HW02.2test.pdf, absence of wonder.).

    Expert Exculpation

     

    Execuconsultation Sequence:

    HW 02-1

    Algorithm:

    1. Start
    2. Declare the repetition=0, LED1=1
    3. Representation period loop restraint an infinite run
      1. Increment iterator
      2. If iterator mod 4==4
        1. Set LED1=1
      3. Else
        1. Set LED1=0
    4. End

    HW 02-2

    MATLAB employment sequence:

    employment LED1=LED()

    %declare the shiftings

    LED1=1;

    iteration=0;

    %the period loop restraint the infinte repetition

    while(1)

    %increment iterator

    iteration=iteration+1

    %if iterator mod 4=0

    if mod(iteration,4)==0

    %set the LED1 as 1

    LED1=1

    %if iterator mod referable attribuconsultation attribuconsultation attribuconsultation 0

    else

    %set LED1 as 0

    LED1=0

    end

    end

    HW-02-3

    Algorithm:

    1. Start
    2. Declare the repetition=0, LED1=1
    3. Representation period loop restraint an infinite run
      1. Increment iterator
      2. If (iterator mod 8)==1 or 2 or 3
        1. Set LED1=1
      3. Else
        1. Set LED1=0
    4. End

    HW- 02-4: Matlab employment

    employment LED1=LED()

    %declare the shiftings

    LED1=1;

    iteration=-1;

    %the period loop restraint the infinte repetition

    while(1)

    %increment iterator

    iteration=iteration+1;

    %find the iterator mod 8

    x=mod(iteration,8)+1;

    %if iterator mod 4=0

    if x==1 | x==2 | x==3

    %set the LED1 as 1

    LED1=1

    %if iterator mod referable attribuconsultation attribuconsultation attribuconsultation 0

    else

    %set LED1 as 0

    LED1=0

    end

    end