"Hugo " <email@example.com> wrote in message news:firstname.lastname@example.org... > Hello, I am trying to obtain deflection results on a beam made with shell > elements > > I wrote a MATLAB code. The problem is that kk is a matrix with 3000*3000 > full of zeros (it´s a singular matrix), and it is not supposed to be. > The code runs well until I call the function feasmbl1.m, which is shown > next
No one will be able to debug this without your data. That means that you're going to have to be the one to step through your code (ideally on a SMALLER problem, one that you can work out on paper) to determine why it doesn't return the results you expect (or determine why your expectations are incorrect.)
I will suggest that you may want to use the ACCUMARRAY or SPARSE functions to perform your accumulation instead of building your own function.