lxq 发表于 2006-11-20 20:18

有没有什么函数求一个矩阵的Jordan标准形?

有没有什么函数求一个矩阵的Jordan标准形?

现在在学这方面的课程

想问问大家MATLAB中有没有这样的函数啊?

或一段代码也可以的

[ 本帖最后由 ChaChing 于 2009-12-28 14:26 编辑 ]

jimin 发表于 2006-11-20 20:39

若当标准型可用函数jordan( ) 来求。
J = jordan(A), 其中J为A的若当标准型.

lxq 发表于 2006-11-20 20:45

我刚刚查过了
但我用的是MATLAB7版本的
出错了
帮助给出的例子都不能运行


Configuration:
MATLAB Version:   7.0.0.19920 (R14)
Operating System: Microsoft Windows XP
Window System:    Version 5.1 (Build 2600: Service Pack 2)
Processor ID:   x86 Family 15 Model 12 Stepping 2, AuthenticAMD
Virtual Machine:Java 1.4.2 with Sun Microsystems Inc. Java HotSpot(TM) Client VM
    (mixed mode)
Default Charset:ibm-1386_P100-2002

Register State:
EAX = 12c0ac10EBX = 00000001
ECX = 00000000EDX = 12b6c440
ESI = 12c0ac10EDI = 00000000
EBP = 00cda634ESP = 00cda0cc
EIP = 0ef11139FLG = 00010246

Stack Trace:
maplec.dll:0x0ef11139(2, 0x00cdb250, 1, 0x00cdb2e0)
libmex.dll:_mexRunMexFile(2, 0x00cdb250, 1, 0x00cdb2e0) + 71 bytes
libmex.dll:public: virtual void __thiscall Mfh_mex::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cdb250, 1, 0x00cdb2e0) + 157 bytes
m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cdb250, 1, 0x00cdb2e0) + 273 bytes
m_interpreter.dll:public: void __thiscall ResolverFunctionDesc::CallFunction(int,struct mxArray_tag * * const,int,struct mxArray_tag * * const)(2, 0x00cdb250, 1, 0x00cdb2e0) + 246 bytes
m_interpreter.dll:public: bool __thiscall Resolver::CallMFunction(int,int,class _m_operand * const,union m_operand_storage *,int,class _m_operand * const,union m_operand_storage *,int *)(2, 2, 0x015177b0, 0) + 840 bytes
m_interpreter.dll:bool __cdecl inResolveMFunctionCall(struct _m_function_desc *,int,int,class _m_operand * const,union m_operand_storage *,int,class _m_operand * const,union m_operand_storage *,int *,enum inMarshalType *,unsigned int,int,unsigned int *,int)(0x10f50f70, 2, 2, 0x015177b0) + 148 bytes
m_interpreter.dll:bool __cdecl accelMFunctionCall(struct _accelOp *,struct _accelOp * *,struct _accelBytecode *,int *,enum inMarshalType *)(0x11122c80, 0x00cdb8f4, 0x0130fbc0, 0x00cdb8ec) + 108 bytes
m_interpreter.dll:int __cdecl accelExec(struct _accelBytecode *,enum inMarshalType *)(0x0130fbc0, 0x00cdb96c, 0, 0) + 18462 bytes
m_interpreter.dll:_inExecuteHotSegment(0x00cdb9a0, 0x00cdba70, 0x00cdba20, 0) + 1542 bytes
m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(1, 2260, 104, 0) + 365 bytes
m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(1, 2260, 40, 0) + 272 bytes
m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x1100dd60 "D腹x", 0, 1, 0) + 773 bytes
m_interpreter.dll:_inWordsj(2, 0x00cdc4c0, 1, 0x00cdc550) + 441 bytes
m_interpreter.dll:public: void __thiscall Mfh_mp::inRunMP(int,struct mxArray_tag * *,int,struct mxArray_tag * *,struct inWorkSpace_tag *)(2, 0x00cdc4c0, 1, 0x00cdc550) + 158 bytes
m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 2, 0x00cdc4c0, 1) + 28 bytes
m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cdc4c0, 1, 0x00cdc550) + 26 bytes
m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cdc4c0, 1, 0x00cdc550) + 273 bytes
m_interpreter.dll:public: void __thiscall ResolverFunctionDesc::CallFunction(int,struct mxArray_tag * * const,int,struct mxArray_tag * * const)(2, 0x00cdc4c0, 1, 0x00cdc550) + 246 bytes
m_interpreter.dll:public: bool __thiscall Resolver::CallMFunction(int,int,class _m_operand * const,union m_operand_storage *,int,class _m_operand * const,union m_operand_storage *,int *)(2, 2, 0x01516e80, 0) + 840 bytes
m_interpreter.dll:bool __cdecl inResolveMFunctionCall(struct _m_function_desc *,int,int,class _m_operand * const,union m_operand_storage *,int,class _m_operand * const,union m_operand_storage *,int *,enum inMarshalType *,unsigned int,int,unsigned int *,int)(0x10f4bc00, 2, 2, 0x01516e80) + 148 bytes
m_interpreter.dll:bool __cdecl accelMFunctionCall(struct _accelOp *,struct _accelOp * *,struct _accelBytecode *,int *,enum inMarshalType *)(0x110e6b50, 0x00cdcb64, 0x0130fa10, 0x00cdcb5c) + 108 bytes
m_interpreter.dll:int __cdecl accelExec(struct _accelBytecode *,enum inMarshalType *)(0x0130fa10, 0x00cdcbdc, 0, 0) + 18462 bytes
m_interpreter.dll:_inExecuteHotSegment(0x00cdcc10, 0x00cdcce0, 0x00cdcc90, 0) + 1542 bytes
m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(1, 1324, 85, 0) + 365 bytes
m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(1, 1324, 20, 0) + 272 bytes
m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x1100dbb0 "D腹x", 0, 3, 0) + 773 bytes
m_interpreter.dll:_inWordsj(2, 0x00cdd1fc, 3, 0x00cdd25c) + 441 bytes
m_interpreter.dll:public: void __thiscall Mfh_mp::inRunMP(int,struct mxArray_tag * *,int,struct mxArray_tag * *,struct inWorkSpace_tag *)(2, 0x00cdd1fc, 3, 0x00cdd25c) + 158 bytes
m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 2, 0x00cdd1fc, 3) + 28 bytes
m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cdd1fc, 3, 0x00cdd25c) + 26 bytes
m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cdd1fc, 3, 0x00cdd25c) + 273 bytes
m_interpreter.dll:_inDispatchFromStack(498, 0x013f78f0 "maple", 2, 3) + 891 bytes
m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x013f78f0 "maple", 0, 2, 3) + 111 bytes
m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(1, 255, 32, 0) + 2282 bytes
m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(1, 255, 20, 0) + 272 bytes
m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x11097470, 0, 1, 1) + 773 bytes
m_interpreter.dll:_inWordsj(2, 0x00cdd91c, 1, 0x00cdd97c) + 441 bytes
m_interpreter.dll:public: void __thiscall Mfh_mp::inRunMP(int,struct mxArray_tag * *,int,struct mxArray_tag * *,struct inWorkSpace_tag *)(2, 0x00cdd91c, 1, 0x00cdd97c) + 158 bytes
m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 2, 0x00cdd91c, 1) + 28 bytes
m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cdd91c, 1, 0x00cdd97c) + 26 bytes
m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cdd91c, 1, 0x00cdd97c) + 273 bytes
m_interpreter.dll:_inDispatchFromStack(529, 0x013f783c "jordan", 2, 1) + 891 bytes
m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x013f783c "jordan", 529, 2, 1) + 111 bytes
m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(1, 115, 23, 0) + 2282 bytes
m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(1, 115, 23, 0) + 272 bytes
m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x110e3f00, 0, 1, 1) + 773 bytes
m_interpreter.dll:_inWordsj(2, 0x00cde03c, 1, 0x00cde09c) + 441 bytes
m_interpreter.dll:public: void __thiscall Mfh_mp::inRunMP(int,struct mxArray_tag * *,int,struct mxArray_tag * *,struct inWorkSpace_tag *)(2, 0x00cde03c, 1, 0x00cde09c) + 158 bytes
m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 2, 0x00cde03c, 1) + 28 bytes
m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cde03c, 1, 0x00cde09c) + 26 bytes
m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cde03c, 1, 0x00cde09c) + 273 bytes
m_interpreter.dll:_inDispatchFromStack(529, 0x10da9bb5 "jordan", 2, 1) + 891 bytes
m_interpreter.dll:_inCallFcnFromReference(0, 0x12d907e0, 0x789b59c0, 0xcccccccd) + 176 bytes
m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(1, 0, 2, 0) + 4115 bytes
m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(1, 0, 1, 0) + 272 bytes
m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x11007c80, 1, 0, 0x11007c80) + 773 bytes
m_interpreter.dll:_inExecCompScript(0, 0x00cde71c, 0x11007c80, 0xffffffff) + 321 bytes
m_interpreter.dll:public: void __thiscall Mfh_mp::inRunMP(int,struct mxArray_tag * *,int,struct mxArray_tag * *,struct inWorkSpace_tag *)(0, 0x00cde71c, 0, 0x00cde77c) + 122 bytes
m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0, 0x00cde71c, 0) + 28 bytes
m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00cde71c, 0, 0x00cde77c) + 26 bytes
m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00cde71c, 0, 0x00cde77c) + 273 bytes
m_interpreter.dll:_inDispatchFromStack(485, 0x013f7714 "Untitled", 0, 0) + 891 bytes
m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x013f7714 "Untitled", 485, 0, 0) + 111 bytes
m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(2, 0, 0, 0) + 2411 bytes
m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(2, 0, 0, 0) + 272 bytes
m_interpreter.dll:_inInterPcode(2, 0x7876f2d8 "蛤vx苞rx`鹯x喧rx蛤vx仳vx", 0, 0) + 69 bytes
m_interpreter.dll:enum inExecutionStatus __cdecl in_local_call_eval_function(int *,struct _pcodeheader *,int *,struct mxArray_tag * * const,enum inDebugCheck)(0x00cdf2c8, 0x00cdf3bc, 2, 0x11076260 "Untitled\n") + 162 bytes
m_interpreter.dll:$L72592(0x7876f2d8 "蛤vx苞rx`鹯x喧rx蛤vx仳vx", 0x11076260 "Untitled\n", 9, 0) + 196 bytes
m_interpreter.dll:enum inExecutionStatus __cdecl inEvalCmdWithLocalReturnandtype(char const *,int *,enum inDebugCheck)(0, 2, 1, 0x00cdf44c "趑�) + 86 bytes
m_interpreter.dll:_inEvalCmdNoEnd(0x11076260 "Untitled\n", 0x00cdf4e4, 0x00cdf4a0, 0x015c1f28) + 16 bytes
bridge.dll:_mnParser(0x7c80b6a1, 0x015c1f28, 0, 0) + 431 bytes
mcr.dll:public: void __thiscall mcrInstance::mnParser(void)(271242, 0x4d5c3a43, 0x414c5441, 0x625c3742) + 87 bytes
MATLAB.exe:0x00401d2f(4194304, 0, 271242, 0x015c1f28)
MATLAB.exe:0x00403e45(0x028ddd60, 0x7c92e1fe "副", 0x7ffd3000, 0x80544dfd)
kernel32.dll:0x7c816fd7(0x00403cc0 "jth(U@", 0, 0, 0)

This error was detected while a MEX-file was running.If the MEX-file
is not an official MathWorks function, please examine its source code
for errors.Please consult the External Interfaces Guide for information
on debugging MEX-files.

If it is an official MathWorks function, please
follow these steps in reporting this problem to The MathWorks so
that we have the best chance of correcting it:

1. Send this crash report to segv@mathworks.com for automated analysis.
   For your convenience, this information has been recorded in:
       C:\DOCUME~1\Owner\LOCALS~1\Temp\matlab_crash_dump.356

2. Also, if the problem is reproducible, send the crash report to
   support@mathworks.com along with:
       - A specific list of steps that will reproduce the problem
       - Any M, MEX, MDL or other files required to reproduce the problem
       - Any error messages displayed to the command window
   A technical support engineer will contact you with further information.

Thank you for your assistance.Please save your workspace and restart
MATLAB before continuing your work.

Error in ==> maple at 104
= maplemex(statement);

Error in ==> sym.maple at 85
= maple(statement);

Error in ==> sym.jordan at 32
       = maple('jordan',A,'''_jcfv''');

Error in ==> jordan at 23
    = jordan(sym(A));

Error in ==> Untitled at 2

这就是错误信息!!!

是不是装的问题啊
我这个版本装的时候就是'难产'的啊

[ 本帖最后由 ChaChing 于 2009-12-28 14:27 编辑 ]

jimin 发表于 2006-11-20 20:49

>>A = gallery(5);
       = jordan(A)

V =

         0          -4          11          -9         1
         -84         243      -230          70         0
         568       -1710      1717      -575         0
       -3892       11675      -11674      3891         0
       -1024      3072       -3072      1024         0


J =

   0   1   0   0   0
   0   0   1   0   0
   0   0   0   1   0
   0   0   0   0   1
   0   0   0   0   0

>> J=jordan(A)

J =

   0   1   0   0   0
   0   0   1   0   0
   0   0   0   1   0
   0   0   0   0   1
   0   0   0   0   0
那不知道是什么原因,我也有matlab7.0版本的,可以运行的

xjzuo 发表于 2006-11-20 21:40

回复

符号的情形也可以实现. 那可能就是你装的问题了.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
syms p1 p2 p3 p4 p
p=[p1 p2;
      p3 p4];
>> jordan(p)

ans =

[ 1/2*p1+1/2*p4+1/2*(p1^2-2*p1*p4+p4^2+4*p3*p2)^(1/2),                                                   0]
[                                                   0, 1/2*p1+1/2*p4-1/2*(p1^2-2*p1*p4+p4^2+4*p3*p2)^(1/2)]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

lxq 发表于 2006-11-20 23:07

是装的问题
我现在还是运行不了
符号情形也一样
页: [1]
查看完整版本: 有没有什么函数求一个矩阵的Jordan标准形?