### Tags: bit, determinant, experience, matlab, matrix, programming, variable

# Finding the determinant of a variable matrix in MATLAB

On Programmer » Matlab

815 words with 1 Comments; publish: Mon, 28 Apr 2008 10:02:00 GMT; (20031.25, « »)

I'm a bit new to MATLAB so this should be a simple question for someone with

experience. I'm trying to find the determinant of a matrix with variables,

for example:

A = [x 2*l; 3 4] where x is a variable and l is a constant. Then I want to s

et it to equal zero (det(A)=0) and I want the answer to be in a simplified v

ersion. So in this case I would like it to return 2x -3l = 0.

How exactly do I do this in MATLAB?

*http://matlab.todaysummary.com/q_matlab_18133.html*

All Comments

Leave a comment...

- 1 Comments
- malton12 aka Joe Hill:
<SNIP math by symbols...

> I'm trying to find the determinant of a matrix

> with variables...

one of the solutions might look like this (requires the

<sym math tbx> )...

% the matrix

a=sym('[x 2*l; 3 4]');

ad=det(a)

% ad = 4*x-6*l

us

#1; Mon, 28 Apr 2008 10:03:00 GMT

- malton12 aka Joe Hill: