matlab 矩阵变量赋值col = 20;row = 3;A = sym(zeros(col,row)); %探测器矢量数据矩阵order = 1;for i = 1:colfor j = 1:rowA(i,j)=sym(['a' num2str(order)]);order = order + 1;endendB = sym(zeros(col,1)); %模矩阵for i=1:colB(i)=sym(['b' num2
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 07:59:44
matlab 矩阵变量赋值col = 20;row = 3;A = sym(zeros(col,row)); %探测器矢量数据矩阵order = 1;for i = 1:colfor j = 1:rowA(i,j)=sym(['a' num2str(order)]);order = order + 1;endendB = sym(zeros(col,1)); %模矩阵for i=1:colB(i)=sym(['b' num2
matlab 矩阵变量赋值
col = 20;
row = 3;
A = sym(zeros(col,row)); %探测器矢量数据矩阵
order = 1;
for i = 1:col
for j = 1:row
A(i,j)=sym(['a' num2str(order)]);
order = order + 1;
end
end
B = sym(zeros(col,1)); %模矩阵
for i=1:col
B(i)=sym(['b' num2str(i)]);
end
for i=1:col
B(i)= sqrt(A(i,1)^2 + A(i,2)^2 + A(i,3)^2);
end
以上程序设定了两个矩阵A与B,B中参数与A相关,我希望对A赋值后,可以求出B
num=1;
for i=1:col
for j=1:row
A(i,j)=num;
num=num+1;
end
end
赋值后subs(A)再求B依旧显示是函数,而不是具体结果,请问怎么办?
B无法显示数字
matlab 矩阵变量赋值col = 20;row = 3;A = sym(zeros(col,row)); %探测器矢量数据矩阵order = 1;for i = 1:colfor j = 1:rowA(i,j)=sym(['a' num2str(order)]);order = order + 1;endendB = sym(zeros(col,1)); %模矩阵for i=1:colB(i)=sym(['b' num2
什么意思?