The variance function of matrix in MATLAB--a reference to online data

Source: Internet
Author: User

>> a = [0.0579 0.1389 0.2722 0.4451
0.3529 0.2028 0.1988 0.9318
0.8132 0.1987 0.0153 0.4660
0.0099 0.6038 0.7468 0.4186];
B1 = var (a); % default to ask for
B2 = var (a, 0); % default formula (with N-1)
C1 = VAR (a, 1); % additional formula (with N)
D1 = var (a, 0, 1); % operation on each column
D2 = var (A, 0, 2); % Action per line
D3 = var (a '); % test
E = Var (a (:));% operation of the matrix by direct access to the storage of the matrix
>> B1
B1 =
0.1362 0.0457 0.0971 0.0601
>> B2
B2 =
0.1362 0.0457 0.0971 0.0601
>> C1
C1 =
0.1022 0.0343 0.0729 0.0450
>> D1
D1 =
0.1362 0.0457 0.0971 0.0601
>> D2
D2 =
0.0287
0.1208
0.1203
0.1021
>> D3
D3 =
0.0287 0.1208 0.1203 0.1021
>> E
E =
0.0819
The final use of a (:) is a good way to get a line representation of a matrix

The variance function of matrix in MATLAB--a reference to online data

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.