Size function in MATLAB

Source: Internet
Author: User

Ize: gets the number of rows and columns of the array.
(1) S = size (a). When there is only one output parameter, a row vector is returned. The first element of the row vector is the number of rows in the group, and the second element is the number of columns in the array.
(2) [R, C] = size (a). When two output parameters exist, the size function returns the number of rows in the array to the first output variable, returns the number of columns in the array to the second output variable.
(3) If you add another item to the input parameter of the size function and assign the value to the item with 1 or 2, the size will return the number of rows or columns of the array. Where R = size (A, 1) number of rows in group A returned by the statement, and c = size (A, 2) Number of columns in group A returned by the statement.

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.