I am getting a sparse error in my Matlab code
4 次查看(过去 30 天)
显示 更早的评论
for i=1:9
for j=1:9
D[i][j]=[0] This line
D[1][1]=[E*A]
D(2)(2)=G*Asy
D(3)(3)=G*Asz
D(4)(4)=G*Jt
D(5)(5)=E*Iy
D(6)(6)=E*Iz
D(7)(7)=1/mu*E1*Jt
D(8)(8)=E1*Jd
D(9)(9)=E1*J11
4 个评论
回答(1 个)
Jishnu Mukherjee
2018-9-28
编辑:James Tursa
2018-9-28
if you are trying to fill the D matrix then try something like this
D=zeros(9,9);
for i=1:9
for j=1:9
D(i,j)=0;
end
end
use () braces instead of []
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!