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)

ans=

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
This project requires you to use the ideas of Chapter 25 regarding maximization of a function. Here we assume that evolution has acted to generate highly efficient foragers. By hig

Illustration of Advanced file input and output: For illustration, to refer to the third number in the first element of the cell array: >> subjdata{1}(3) ans =

Illustration of Logical vectors: Calling the function appears to return similar vector as simply vec > 5, and summing the result still works to determine how many elements wer

Error-Checking for Integers: As MATLAB uses the type double by default for all the values, to check to make confirm that the user has entered an integer, the program have to c

Function isreal - complex numbers: The function isreal returns 1 for logical true when there is no imaginary part of the argument, or 0 for false when the argument does have a

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

Creating Customized strings: There are many built-in functions which create customized strings, including blanks, char, and sprintf. We know that the char function can be u

strvcat function - concatenation: The function strvcat will concatenate it vertically, that means that it will generate a column vector of the strings.   >> strvcat(fir

Common form of the switch statement: The common form of the switch statement is as shown below:   switch switch_expression   case caseexp1    action1   case cas

Labels and Prompts: The script loads all the numbers from file into a row vector. It then splits the vector; it stores the initial element that is the experiment number in a v