%% Compute Determinant Using Minor Expansion
% Create a symbolic matrix that contains polynomial entries.

syms a x 
A = [1, a*x^2+x, x;
     0, a*x, 2;
     3*x+2, a*x^2-1, 0]

% Compute the determinant of the matrix using minor expansion.

B = det(A,'Algorithm','minor-expansion')

%
% Copyright 2018 The MathWorks, Inc.