Home / Expert Answers / Computer Science / matlab-i-have-to-plot-a-red-dot-at-the-maximum-diffrence-and-underneath-it-write-34-max-34-i-already-pa531

(Solved): matlab: i have to plot a red dot at the maximum diffrence and underneath it write "max" i already di ...



matlab:
i have to plot a red dot at the maximum diffrence and underneath it write "max" i already did this but my dot looks off and it seems that my "max" is where the dot (picture of my graph below) should be. I took a screenshot of the assignment below and also how the graph should look. Thank you!
my work
\( \begin{array}{l}\text { max } v a l=\max (z(:)) ; \\ \text { [row, coll }]=\text { find }(z==\text { max_val); } \\ \text
directions for assignment below
8. Find the row and column of the maximum value in the difference array.
1. HINT: You can use a combination of find(), \( \ma
\( \begin{array}{l}\text { max } v a l=\max (z(:)) ; \\ \text { [row, coll }]=\text { find }(z==\text { max_val); } \\ \text { hold on } \\ \text { plot(row, col, "r") } \\ \text { text } \\ x=\text { col; } \\ y=\text { row; } \\ \text { text }(x, y, \text { max", color", "red"); }\end{array} \) 8. Find the row and column of the maximum value in the difference array. 1. HINT: You can use a combination of find(), , and linear indexing to find the row and column. 2. NOTE: The grading script (see below) will randomly rotate the airfields, so your max difference value location must not be "hard-coded". 9. Display the max difference on the image 1. Turn plot hold on. 2. Plot a single red point (' ') at the position of the maximum difference. 3. Use the text command to add the word "max" a little below and to the right of the point. The color must also be red.


We have an Answer from Expert

View Expert Answer

Expert Answer


We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe