The result of solving a polynom equation is a 1x2 vector or a 1x1 in some instances. I am trying to store all solutions for equations with different coefficients. so some solutions are just 1x1 vectors. how can i store these efficiently?
n = 1;
%sol = zeros(size(coef)); %create solution matrix in memory
sol = {};
while n < size(coef,2)
sol(n) = roots(coef(:,n));
end
"Conversion to cell from double is not possible." error.
coef is coefficient matrix