I was wondering if there is any Matlab function that would allow me to retain only the positive root of a quadratic equation. I want to use that function along with the 'roots' function to solve n number of quadratic equations to get n number of positive roots.
x=zeros(1,n)for i=1:nx(i)=function(roots([a(i) b(i) c(i)]))end
Best Answer