Matlab Common small function

Source: Internet
Author: User

Sum: Sum operation

Sum (a): Matrix A sums by column (sum of each column), resulting in a row vector

SUM (a,2): Matrix A sums by rows (sums each row), resulting in a row-and-column vector

Max: Max element operation

Returns only the maximum value condition

Max (a): matrix A maximizes the value by column (maximum of each column) and results in a row vector

Max (a,[],2): matrix A maximizes the value by row (maximum of each row) and results in a single column vector

Max (the maximum value in a (:)) matrix A

Returns the maximum value and the location of the condition

[M,i] = max (a): Returns the indicator and maximum of the maximum value of each column in matrix A, M and I are a row vector, I hold the maximum number of rows for each column in a, and m holds the maximum value for each column in a

[M,i] = max (a,[],2): Returns the metric and maximum of the maximum value for each row in matrix A, M and I are a column vector, I hold the maximum number of columns for each row in a, and m holds the maximum value for each row in a

[M,i] =max (A (:)): Returns the index and maximum of the maximum value in matrix A, M and I are a number, I is the index of the largest value in a, M is the maximum value in a

Matlab Common small function

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.