Matlab reshape (), full ()

Source: Internet
Author: User

First, reshape ()

For this function, it is the refactoring matrix.

(1) Requirements: The number of matrix elements before and after reconstruction is consistent. such as 3*4 matrix can be re-constituted 2*6,2*3*2 and so on.

(2) Refactoring method: First, the matrix is converted to a vector by column, then on the basis of the vector, and according to the new matrix of the column interception composition. For example, the 3*4 matrix can re-form 2*6:

1 2 3

4 5 6

7 8 9

10 11 12

First by column: 1 4 7 10 2 5 8 11 3 6 9 12

Intercept by column of new matrix: 1 4| 7 | 2 5| 8| 3 6| 9 12

More please click here

Second, full ()

Sparse matrix Two kinds of storage methods:

A = [0, 0, 0; 0, 1, 0; 1, 0, 0]; S = Sparse (a) a = Full (S) output result:>> A = [0, 0, 0; 0, 1, 0; 1, 0, 0];Act 1:S = Sparse (A)Act 2:A = Full (s) s = (3,1) 1 (2,2) 1 A = 0 0 00 1 01 0 0

Matlab reshape (), full ()

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.