MATLAB: Undefined function or variable ‘setmdof’

undefined function or variable

M = diag([1 1 2]);
K = [2 -1 0;-1 3 -2;0 -2 2];
setmdof(M,K)
That is my Matlab script, but the function "setmdof" is not recognized. Can some one tell me how to solve this problem?

Best Answer

I found no such function in the MATLAB documentation or on the File Exchange.
Searching using Google found a reference to a function in a book "Stress, Strain, and Structural Dynamics" by Bingen Yang. If you're using this text, I suspect this function was distributed on a CD included with the book. You'd need to find that CD or see if the author and/or publisher has made that function available online. I see a webpage for the book but I don't know if all the functions are available there.
Related Question