To find the roots with zero real part of a 1x3001 complex matrix in Matlab that does not contain nan
or inf
, you can use the roots
function. Here's how you can do it:
main.m339 chars9 lines
In this code snippet, we first generate a random 1x3001 complex matrix. We then use the roots
function to find the roots of this matrix. Finally, we filter out any roots that contain nan
or inf
to get the roots with zero real part.
gistlibby LogSnag