I am getting a sparse error in my Matlab code
이전 댓글 표시
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
madhan ravi
2018년 9월 28일
select the whole code and press the code button
Adam Danz
2018년 9월 28일
If this is your entire code except for the two ends you're missing, you don't need to use loops at all. If you want useful feedback you'll need to upload the rest of the loops and format it correctly using the { } button.
Virajan Verma
2018년 9월 29일
편집: Walter Roberson
2018년 9월 29일
madhan ravi
2018년 9월 29일
편집: madhan ravi
2018년 9월 29일
Forgot to upload the file/s.
답변 (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 []
카테고리
도움말 센터 및 File Exchange에서 Software Development Tools에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!