Example of minimum and maximum value, MATLAB in Mathematics

Example of Minimum and Maximum Value

For matrices, the functions min and max operate column wise by the default:

>> mat = randint(2,4,[1 20])

mat =

   9   10   17    5

  19    9   11   14

>> min(mat)


9 9 11 5

>> [minval, minind] = min(mat)

minval =

9 9 11 5

minind =

1 2 2 1

Posted Date: 10/22/2012 6:55:03 AM | Location : United States

Related Discussions:- Example of minimum and maximum value, Assignment Help, Ask Question on Example of minimum and maximum value, Get Answer, Expert's Help, Example of minimum and maximum value Discussions

Write discussion on Example of minimum and maximum value
Your posts are moderated
Related Questions
Write a MATLAB function [d1, u1, l1, c1, r1] = NaiveGaussArrow(d, u, l, c, r) that takes as input the 5 vectors de ned above representing A. This function performs Naive Gauss redu

Three-dimensional pie and bar: For the bar3 function, x & y vectors are passed and the function displays three-dimensional bars as shown in figure: Figure: Three-dimen

Illustration of Spreadsheet Files: This reads the numbers in a double vector variable nums and the text in a cell array txt (the xlsread function forever returns the numbers f

Writing to Files: There are many lower level functions which can write to files. We will focus on the fprintf function that can be used to write a file and also to append to a

fprintf function - File function: The fprintf function really returns the number of bytes which was written to the file, therefore if you do not want to see that number, suppr

Function fopen - file function: The permission string in the call to the fopen function identifies that the file is opened for writing to it. Just as when reading from a file,

Print an imaginary number: To print an imaginary number, the function disp will show both parts automatically: >> disp(z1)    4.0000 + 2.0000i The function fprint

Illustrations of Variable number of output arguments: In the illustrations shown here, the user should actually know the type of the argument in order to establish how many va

Counting in a While Loop: Whenever it is not known ahead of the time how many values will be entered into the script, it is often essential to count the number of values which

Refer the subset of a matrix: It is also possible to refer to the subset of a matrix. For illustration, this refers to the first & second rows, second & third columns: >> m