why i get this ERROR???
显示 更早的评论
回答(1 个)
Star Strider
2020-12-8
0 个投票
I suspect it is because ‘(2*n-1)’ is less than or equal to 0.
I have no idea what ‘n’ is, so it could also be the problem if it is not an integer.
Since apparently ‘Load’ is not throwing an error, I suspect it is a function you (or someone else) wrote. The MATLAB function has a lower-case ‘L’, and since MATLAB is case-sensitive, the difference is not the problem.
7 个评论
Steven Lord
2020-12-8
The Workspace component in the picture of the MATLAB Desktop indicates n is 0. That means the code was trying to assign to element -1 of Loadvector. Arrays in MATLAB don't have a -1st element.
ammar ahmed
2020-12-8
Walter Roberson
2020-12-8
It appears that you have some 0 in the first column of your array Load
ammar ahmed
2020-12-8
ammar ahmed
2020-12-8
Walter Roberson
2020-12-8
编辑:Walter Roberson
2020-12-8
As outside observers, we have no reason to expect that the kk matrix you are creating will be non-singular.
Typically when a stiffness matrix is singular, the implication is that there are too many degrees of freedom, and that additional entries need to be added to pin down some part that is too free to move.
>> size(kk)
ans =
1698 1698
>> rank(kk)
ans =
591
Not even close :( You are missing pinning down a lot of values !
Star Strider
2020-12-8
Steven — I didn’t see ‘n’ in the screencap. Thank you for discovering it. (My Answer remains valid.)
Walter — Thank you!
类别
在 帮助中心 和 File Exchange 中查找有关 Conversion Between Symbolic and Numeric 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

