How to assign the values of different dimensions to matrices in matlab

Source: Internet
Author: User

1 >> A=zeros (5,3); 2 >> b=[2;  3]; 3 >> A (:,2) =B; 4 Assignment dimension mismatch with subscript.

How to solve the above problem?

1>>a2 3A =4 5      0     0     06      0     0     07      0     0     08      0     0     09      0     0     0Ten  One>>b A  -b = -  the      2 -      3

You want to assign B to the second column of a, but there is an error in the direct assignment;

How to assign the values of different dimensions to matrices in matlab

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.