初学MATLAB 遇到的问题:In an assignment A(I) = B,the number of elements in B andA=[1,1,1,4,1,1/2;1,1,2,4,1,1/2;1,1/2,1,5,3,1/2;1/4,1/4,1/5,1,1/3,1/3;1,1,1/3,3,1,1;2,2,2,3,3,1]; [x,y]=eig(A);eigenvalue(1)=diag(y);lamda=eigenvalue(l); ci1=(lamd
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/29 05:53:02
初学MATLAB 遇到的问题:In an assignment A(I) = B,the number of elements in B andA=[1,1,1,4,1,1/2;1,1,2,4,1,1/2;1,1/2,1,5,3,1/2;1/4,1/4,1/5,1,1/3,1/3;1,1,1/3,3,1,1;2,2,2,3,3,1]; [x,y]=eig(A);eigenvalue(1)=diag(y);lamda=eigenvalue(l); ci1=(lamd
初学MATLAB 遇到的问题:In an assignment A(I) = B,the number of elements in B and
A=[1,1,1,4,1,1/2;1,1,2,4,1,1/2;1,1/2,1,5,3,1/2;1/4,1/4,1/5,1,1/3,1/3;1,1,1/3,3,1,1;2,2,2,3,3,1]; [x,y]=eig(A);eigenvalue(1)=diag(y);lamda=eigenvalue(l); ci1=(lamda-6)/5;cr1=ci1/1.24 w1=x(:,1)/sum[x(:,1)] 总是显示:In an assignment A(I) = B,the number of elements in B and I must be the same.这是什么原因呢?
初学MATLAB 遇到的问题:In an assignment A(I) = B,the number of elements in B andA=[1,1,1,4,1,1/2;1,1,2,4,1,1/2;1,1/2,1,5,3,1/2;1/4,1/4,1/5,1,1/3,1/3;1,1,1/3,3,1,1;2,2,2,3,3,1]; [x,y]=eig(A);eigenvalue(1)=diag(y);lamda=eigenvalue(l); ci1=(lamd
赋值有错误. 代码: clc; clear all; close all; A=[1,1,1,4,1,1/2;1,1,2,4,1,1/2;1,1/2,1,5,3,1/2;1/4,1/4,1/5,1,1/3,1/3;1,1,1/3,3,1,1;2,2,2,3,3,1]; [x,y]=eig(A); eigenvalue(:, 1)=diag(y); lamda=eigenvalue(1); ci1=(lamda-6)/5; cr1=ci1/1.24 w1=x(:,1)/sum(x(:,1)) 结果: cr1 = 0.0996 w1 = 0.1507 0.1792 0.1886 0.0472 0.1464 0.2879 >>
满意请采纳