Find Maximum and Minimum values of Given Elements Using MATLAB

Question

Write the following commands in the same script file. Leave off the semicolons so all answers print to the command window. Every bulleted instruction should produce some output. Turn in the script and all output.

For the following, you will be getting values out of ts1 and putting them in new variables. All of your commands should be of the form: tsNew = ts1(first:step:last ). Remember that if you leave step out, it defaults to 1 and end is a shortcut for length(ts), ie, the index of the last element. Note, if you’re confused about values versus indices, double click on ts1 in the variable window to bring it up in spread-sheet form. The indices are the numbers along the top (1 2 3), and the values are the ones below that. All of your  first:step:last should be indices, not values.

  • Get the 3rd element out of ts1 and put it in a variable t3.
  • Get the first through third element of ts1 and put the in a variable ts1to3
  • Get the 3rd through 1st element of ts1 and put them in a variable ts3to1.
  • Get the elements of ts1 in reverse order and put them in a variable tsRev.
  • Check that this is correct by printing out the first and last element of tsRev
  • Get every other element of ts1 and put it in a variable tsSkip.
  • Check that this is correct by printing out the length of tsSkip
  • Add one to every element in ts1 and store the result back in ts1. Do this three times. Question: the values in ts1 have changed. Have the values that you created in the previous steps changed? (You can look at them in the variable window).
  • Check the new first and last values of ts1

 

Summary

This question belongs to MATLAB software and discusses about application of MATLAB in mathematics to find out the maximum and minimum values in a group of given elements.

 

 

 

 

Download Full Solution

Comments

  • HWA
    Rasha

    this is a very good website

  • HWA
    maani

    I have 50 questions for the same test your page is showing only 28

  • HWA
    joeanne

    hi can you please help or guide me to answer my assignments. thanks

  • HWA
    joeanne

    hi can anyone help or guide me to my assignments. thanks

  • HWA
    Monik


  • HWA
    Cristina

    This solution is perfect ...thanks

  • HWA
    Janete

    Hello Allison,I love the 2nd image that you did! I also, had never heard of SumoPaint, is something that I will have to exolpre a bit! I understand completely the 52 (or so) youtube videos that you probably watched. Sometimes they have what you want, sometimes they don't! However, it is always satisfying when you are able to produce something that you have taught yourself. Great job!Debra 0 likes

  • HWA
    Sandeep

    Perfect bank of solution. 

  • HWA
    Oxana

    great !

  • HWA
    Paul Brandon-Fritzius

    thanks for the quick response. the solution looks good. :)

  • HWA
    tina Johnson

    thnx for the answer. it was perfect. just the way i wanted it. 

  • HWA
    Giuseppe

    works fine.