for i=1:njoint q(:,:)=0 for j=1:2 for k=1:nelement if elnode(k,j) == i q(i,1) = q(i,1) - cc(k,j,1) q(i,2) = q(i,2) - cc(k,j,2) q(i,3) = q(i,3) - cc(k,j,3) else continue end end end q(i,1) = q(i,1) + ss(i,1) + jload(i,1) q(i,2) = q(i,2) + ss(i,2)+ jload(i,2) q(i,3) = q(i,3) + ss(i,3) + jload(i,3) end
its my loop and ss matrix is a matrix with variable arrays. i want to create q matrix with ss matrix. i faced this error: The following error occurred converting from sym to double: DOUBLE cannot convert the input expression into a double array.
Error in analyze (line 96) q(i,1) = q(i,1) – cc(k,j,1)
Best Answer