1. ## MEX Files

Hi everyone,

I'm just wondering if somebody can help me out with running a MEX file on MATLAB. The MEX file I would like to run, along with the m file that calls it, is from

Evan Anderson

and it's to calculate the generalized ordered schur decomposition for a pair of matrices.

I save the m file and dll file in the same directory, and when i attempt to run the m file it tells me that the required "process is not found" (referring to the dll file).

So my question is, do i have to do something to the .dll file before i can call it from an m file? shouldn't it have a .mex extension rather than .dll? or doesn't it matter?

Thanks guys.

Hi everyone,

I'm just wondering if somebody can help me out with running a MEX file on MATLAB. The MEX file I would like to run, along with the m file that calls it, is from

Evan Anderson

and it's to calculate the generalized ordered schur decomposition for a pair of matrices.

I save the m file and dll file in the same directory, and when i attempt to run the m file it tells me that the required "process is not found" (referring to the dll file).

So my question is, do i have to do something to the .dll file before i can call it from an m file? shouldn't it have a .mex extension rather than .dll? or doesn't it matter?

Thanks guys.

Is the directory in the Matlab search path?

RonL

3. hi again,

i checked that the search path was correct, and now i'm getting this error:

"...schurgaux.dll is not a valid Win32 application."

Cheers.

hi again,

i checked that the search path was correct, and now i'm getting this error:

"...schurgaux.dll is not a valid Win32 application."

Cheers.
Unfortunatly my machines with Matlab installed are not connected to the outside world, so I can't try this out easily.

The only other suggestion I can think of is that the download did not complete properly and you have a corrupted version of the dll, may be you could try downloading it again (but you probably have already tried that).

RonL

5. Thats ok Ron, cheers anyway.

Matlab actually has in built commands to compute a qz decomposition and to re-order it. So i shouldn't need the dll file anyway. But I cannot get the MATLAB commands to give me the right answer. (I'm trying to replicate something, so I have the answer already.)

For a pair of matrices, A and B, I would like to find

B = QTZ'
A = QSZ'

where both T and S are upper triangular and QQ' = ZZ' = the identity matrix. The eigenvalues of the system are given by S(i,i)/T(i,i), i.e. the ratio of the corresponding diagonal elements of the two matrices.

I need the decomposition to be ordered such that

S(1,1)/T(1,1) < S(2,2)/T(2,2) < ... < S(n,n)/T(n,n).

MATLAB has a function called ordqz that allows you to reorder a qz decomposition, but I cannot seem to be able to reorder it in such a manner that is consistent with the above, i.e. with the eigenvalues decreasing in absolute value.

6. I Meant Increasing In Abs Value, Sorry