Question

In the text book subscripted indexing is used to refer to elements in a matrix. Determine...

In the text book subscripted indexing is used to refer to elements in a matrix. Determine the indices (i=row number and j=column number) of the maximum value of the elements in the given matrix Z. for Matlab

0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB CODE

clc;
Z=input('Enter matrix'); % Input Desired matrix
maximum = max(max(Z)); % To find maximum value of matrix
[Max_index_Row,Max_index_Col]=find(Z==maximum); % To find index
fprintf('The maximum value of matrix Z is %d positioned at row =%d and column=%d index \n', maximum,Max_index_Row,Max_index_Col');

RESULTS

Enter matrix[1 2;1 3]
The maximum value of matrix Z is 3 positioned at row =2 and column=2 index


>>

Add a comment
Know the answer?
Add Answer to:
In the text book subscripted indexing is used to refer to elements in a matrix. Determine...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • MATLAB Write a code where the elements of a squared matrix size (order) n are equal...

    MATLAB Write a code where the elements of a squared matrix size (order) n are equal to the sum of its row and column position (I + j)

  • Homework 06b For...Next Statements The elements of a Hilbert matrix are given by the formula bu=1/(i+j-1),...

    Homework 06b For...Next Statements The elements of a Hilbert matrix are given by the formula bu=1/(i+j-1), where į and j are the row and column indices of the matrix. For example, the 5x5 Hilbert matrix is: [ 1 172 1/3 1/4 175 172 173 174 175 176 173 174 175 176 177 174 175 176 177 178 175 176 177 178 179 Write a Sub that writes the elements of a mxm Hilbert matrix on an Excel spreadsheet, where m...

  • 2. Matrix A = Matrix B = log(A) Write MATLAB expressions to do the following. Evaluate...

    2. Matrix A = Matrix B = log(A) Write MATLAB expressions to do the following. Evaluate the sum of the first row of B Evaluate the maximum value in the vector resulting from element-by-element multiplication of the first column of B with the third column of A. Use element-by-element division to divide the third row of A by the first three elements of the second column of B and evaluate the sum of the elements of the resulting vector.

  • 1. Write a MATLAB function that takes a matrix, a row number and a scalar as...

    1. Write a MATLAB function that takes a matrix, a row number and a scalar as arguments and multiplies each element of the row of the matrix by the scalar returning the updated matrix. 2. Write a MATLAB function that takes a matrix, two row numbers and a scalar as arguments and returns a matrix with a linear combination of the rows. For example, if the rows passed to the function were i and j and the scalar was m,...

  • This is related to cryptography and network security book, chapter 6.3 Please i eant a step...

    This is related to cryptography and network security book, chapter 6.3 Please i eant a step by step explanation of this sonce im confused at XOR steps. Thank you I11 0 0 bs that the hon in Equane row and one column. Furthermore, the that the bitwise XOR is addition in GF) GF(28) is 195尸 tion,4 each element in the product matrix is the sumofprroduct one row and one column. In this case, each element in bitwise XOR of products...

  • Explain how to solve the following problem iteratively: "Given an nxm 2D array A such that...

    Explain how to solve the following problem iteratively: "Given an nxm 2D array A such that the elements in each row and each column of A are sorted, and an element x, find indices i and j such that A[i,j] is the largest element less than x, or determine that no such values exist."

  • System Programming in C

    Explain what the problem is within the program. Fix the problem when you create a child process per column. The code is given below. So basically, after the child processes have successfully excuted their code, the final print statement does not give the correct values. It prints the original matrix rather than the multiplied matrix.#include  #include  #include  #include  int main(int argc, char *argv[]){ int row = 0; int column = 0; row = atoi(argv[1]); column = atoi(argv[2]); int *A = ...

  • Topic Ch. 10 : Write a class definition for a 2x2 matrix, with methods for get(i,j),...

    Topic Ch. 10 : Write a class definition for a 2x2 matrix, with methods for get(i,j), set(i,j,v) for getting and setting (i,j)-the entry where i is the row index 0 or 1, and j is the column index 0 or 1, and set() sets the entry in row i and column j to be v, a method for adding a matrix y to given x (e.g. x.add(y) will set x=x+y where the corresponding matrix entries are added), for multiplying( e.g....

  • I want to change this C code so that instead of prompting the user to enter...

    I want to change this C code so that instead of prompting the user to enter the argument value, or requiring the argument be entered after by pressing the “enter” key, instead I want the code changed so that the program opens a file, (which include the input values) read in the elements and pass in the input file as a command line argument. (the input file includes the size of the matrix and the matrix values) Here's an example...

  • C++ , no ptrs or struct Solve a system of equations using the Gaussian Elimination technique....

    C++ , no ptrs or struct Solve a system of equations using the Gaussian Elimination technique. The matrix will be 10X10 or smaller and will contain floats. Then read in the matrix. Then read in the original answer column (see below for example). Then using the element location 1,1 of the matrix (note I am using the mathematics convention of starting numbering at 1), you will change row 1 and also eliminate the other elements in column 0 using Gaussian...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT