| Author |
deterninant of matrix with function of x
|
|
| aykut öksüz 2006-09-29, 7:07 pm |
| how can i find the determinant of below matrix including function of
x, in MATLAB;
exp(x) exp(-x)
exp(2x) exp(-2x)
| |
| Nasser Abbasi 2006-09-29, 7:07 pm |
|
"aykut öksüz" <haykozoom@yahoo.com> wrote in message
news:ef427a8.-1@webcrossing.raydaftYaTP...
> how can i find the determinant of below matrix including function of
> x, in MATLAB;
> exp(x) exp(-x)
> exp(2x) exp(-2x)
[color=darkred]
ans =
1.0e+003 *
0.05459815003314 0.00001831563889
2.98095798704173 0.00000033546263
You could now wrap a function aound the above passing it the value of 'x'.
Nasser
| |
| Rune Allnor 2006-09-29, 7:07 pm |
|
aykut =F6ks=FCz skrev:
> how can i find the determinant of below matrix including function of
> x, in MATLAB;
> exp(x) exp(-x)
> exp(2x) exp(-2x)
I don't think you can (there may be something in the symbolic
toolbox, though).
But the determinant of that 2x2 matrix ought not to be too difficult
to compute by hand...?
Or do you want something more general?
Rune
| |
| Greg von Winckel 2006-09-29, 7:07 pm |
| Assuming you have the symbolic toolbox:
syms x
A=[exp(x) exp(-x); exp(2*x) exp(-2*x)];
det(A)
If you don't you can still do the following:
A=@(x) [exp(x) exp(-x); exp(2*x) exp(-2*x)];
Then simply evaluate for the values of x you are interested in
det(A(0))
det(A(1/2))
det(A(1))
and so on
HTH,
Greg
aykut öksüz wrote:
>
>
> how can i find the determinant of below matrix including function
> of
> x, in MATLAB;
> exp(x) exp(-x)
> exp(2x) exp(-2x)
| |
| aykut öksüz 2006-09-29, 7:07 pm |
| actually i've a below matrix and much bigger ones to determine the
linearity of a differential equaion using wronskion matrix method;
exp(x) exp(-x) exp(2x) exp(-2x)
exp(x) -exp(-x) 2exp(2x) -2exp(-2x)
exp(x) exp(-x) 4exp(2x) 4exp(-2x)
exp(x) -exp(-x) 8exp(2x) -8exp(-2x)
i know the answer of 72 with solving long writings.
i tried the writings of you but failed in program to solve.
| |
| Greg von Winckel 2006-09-29, 7:07 pm |
| Again, if you have the symbolic toolbox:
syms x
A=[ exp(x) exp(-x) exp(2x) exp(-2x);...
exp(x) -exp(-x) 2exp(2x) -2exp(-2x);...
exp(x) exp(-x) 4exp(2x) 4exp(-2x);...
exp(x) -exp(-x) 8exp(2x) -8exp(-2x) ];
det(A);
then you can evaluate the symbolic expression for particular x
if not and you have Matlab 7.0+ use an anonymous function
A=@(x)[ exp(x) exp(-x) exp(2x) exp(-2x);...
exp(x) -exp(-x) 2exp(2x) -2exp(-2x);...
exp(x) exp(-x) 4exp(2x) 4exp(-2x);...
exp(x) -exp(-x) 8exp(2x) -8exp(-2x) ];
det(A(1))
det(A(2))
etc
If you have an old version of Matlab just make a regular function
function d=mydet(x)
d=det([ exp(x) exp(-x) exp(2x) exp(-2x);...
exp(x) -exp(-x) 2exp(2x) -2exp(-2x);...
exp(x) exp(-x) 4exp(2x) 4exp(-2x);...
exp(x) -exp(-x) 8exp(2x) -8exp(-2x) ]);
HTH,
Greg
aykut öksüz wrote:
>
>
> actually i've a below matrix and much bigger ones to determine the
> linearity of a differential equaion using wronskion matrix method;
>
> exp(x) exp(-x) exp(2x) exp(-2x)
> exp(x) -exp(-x) 2exp(2x) -2exp(-2x)
> exp(x) exp(-x) 4exp(2x) 4exp(-2x)
> exp(x) -exp(-x) 8exp(2x) -8exp(-2x)
>
> i know the answer of 72 with solving long writings.
>
> i tried the writings of you but failed in program to solve.
| |
| aykut öksüz 2006-09-29, 7:07 pm |
| i've a matlab 6.5 version. i write all of you say but there is an
repeated errors;
[color=darkred]
??? B=@(x)[exp(x) exp(-x);exp(x) exp(2x)];
|
Error: "identifier" expected, "(" found.
[color=darkred]
??? syms x
|
Error: Missing operator, comma, or semicolon.
[color=darkred]
??? Undefined function or variable 'x'.
|
|
|
|