find the roots of the polynomial 270 – 12x + 4x 2 + 2x 3 in matlab

main.m
coefficients = [2, 4, -12, 270]; % Coefficients of the polynomial in descending order of powers
rootsOfPolynomial = roots(coefficients); % Finding the roots of the polynomial
disp(rootsOfPolynomial); % Displaying the roots
223 chars
4 lines

related categories

gistlibby LogSnag