{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW7 - Homework#7 For Loops 2 Reading None Homework This...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework #7: For Loops 2 Reading: None Homework: This assignment will be done entirely in MATLAB. When asked for a “program” you should create an m-file (script). Be sure to turn-in the completed script along with any runs you are asked for. In addition, you need a flow diagram for each program. Turn problems in IN THE ORDER THEY ARE ASSIGNED. Each problem needs to be labeled so the TA can find your work. Write a MATLAB script (m-file) that 1. Uses the elements of a matrix A to generate the elements of a matrix B . The A matrix can have any dimension. If the element of A is greater than or equal to 1, then the corresponding value in B is the natural log of the element of A . If the element of A is less than 1, then the corresponding value in B is the element of A plus 20. Test your code for A = 3 5 - 4 - 8 - 1 33 - 17 6 - 9 2. Locates peaks in set of elevation data in a matrix, E . A “peak” exists when a value at a particular coordinate ( i, j ) is larger than the 8 other values around it. The matrix E has NX
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern