I have a program that evaluates mode shapes using the null space of an 8X8 matrix, "K". It works great when the null space exists, and I get an 8X1 vector for "u". However, for some values of "K" there is no null space, so for that "u" I get "Empty matrix: 8-by-0" and need to use a different method.
I tried to use
to test if u is an empty matrix, but I get an error that tells me that "Matrix dimensions must agree". Is there any way to use an if statement that will run only if u is an empty 8x0 matrix?
(And yes, I know that eval + num2str is frowned upon, I didn't write that part! Apologies in advance!)