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

Info iconThis 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
Background image of page 1

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

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

Page1 / 2

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

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online