声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 3428|回复: 5

[编程技巧] 有没有什么函数求一个矩阵的Jordan标准形?

[复制链接]
发表于 2006-11-20 20:18 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

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

现在在学这方面的课程

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

或一段代码也可以的

[ 本帖最后由 ChaChing 于 2009-12-28 14:26 编辑 ]
回复
分享到:

使用道具 举报

发表于 2006-11-20 20:39 | 显示全部楼层
若当标准型可用函数jordan( ) 来求。
J = jordan(A), 其中J为A的若当标准型.
 楼主| 发表于 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 = 12c0ac10  EBX = 00000001
  ECX = 00000000  EDX = 12b6c440
  ESI = 12c0ac10  EDI = 00000000
  EBP = 00cda634  ESP = 00cda0cc
  EIP = 0ef11139  FLG = 00010246

Stack Trace:
  [0] maplec.dll:0x0ef11139(2, 0x00cdb250, 1, 0x00cdb2e0)
  [1] libmex.dll:_mexRunMexFile(2, 0x00cdb250, 1, 0x00cdb2e0) + 71 bytes
  [2] libmex.dll:public: virtual void __thiscall Mfh_mex::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(2, 0x00cdb250, 1, 0x00cdb2e0) + 157 bytes
  [3] 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
  [4] m_interpreter.dll:public: void __thiscall ResolverFunctionDesc::CallFunction(int,struct mxArray_tag * * const,int,struct mxArray_tag * * const)(2, 0x00cdb250, 1, 0x00cdb2e0) + 246 bytes
  [5] 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
  [6] 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
  [7] m_interpreter.dll:bool __cdecl accelMFunctionCall(struct _accelOp *,struct _accelOp * *,struct _accelBytecode *,int *,enum inMarshalType *)(0x11122c80, 0x00cdb8f4, 0x0130fbc0, 0x00cdb8ec) + 108 bytes
  [8] m_interpreter.dll:int __cdecl accelExec(struct _accelBytecode *,enum inMarshalType *)(0x0130fbc0, 0x00cdb96c, 0, 0) + 18462 bytes
  [9] m_interpreter.dll:_inExecuteHotSegment(0x00cdb9a0, 0x00cdba70, 0x00cdba20, 0) + 1542 bytes
  [10] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(1, 2260, 104, 0) + 365 bytes
  [11] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(1, 2260, 40, 0) + 272 bytes
  [12] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x1100dd60 "D腹x", 0, 1, 0) + 773 bytes
  [13] m_interpreter.dll:_inWordsj(2, 0x00cdc4c0, 1, 0x00cdc550) + 441 bytes
  [14] 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
  [15] 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
  [16] 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
  [17] 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
  [18] m_interpreter.dll:public: void __thiscall ResolverFunctionDesc::CallFunction(int,struct mxArray_tag * * const,int,struct mxArray_tag * * const)(2, 0x00cdc4c0, 1, 0x00cdc550) + 246 bytes
  [19] 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
  [20] 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
  [21] m_interpreter.dll:bool __cdecl accelMFunctionCall(struct _accelOp *,struct _accelOp * *,struct _accelBytecode *,int *,enum inMarshalType *)(0x110e6b50, 0x00cdcb64, 0x0130fa10, 0x00cdcb5c) + 108 bytes
  [22] m_interpreter.dll:int __cdecl accelExec(struct _accelBytecode *,enum inMarshalType *)(0x0130fa10, 0x00cdcbdc, 0, 0) + 18462 bytes
  [23] m_interpreter.dll:_inExecuteHotSegment(0x00cdcc10, 0x00cdcce0, 0x00cdcc90, 0) + 1542 bytes
  [24] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(1, 1324, 85, 0) + 365 bytes
  [25] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(1, 1324, 20, 0) + 272 bytes
  [26] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x1100dbb0 "D腹x", 0, 3, 0) + 773 bytes
  [27] m_interpreter.dll:_inWordsj(2, 0x00cdd1fc, 3, 0x00cdd25c) + 441 bytes
  [28] 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
  [29] 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
  [30] 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
  [31] 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
  [32] m_interpreter.dll:_inDispatchFromStack(498, 0x013f78f0 "maple", 2, 3) + 891 bytes
  [33] m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x013f78f0 "maple", 0, 2, 3) + 111 bytes
  [34] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(1, 255, 32, 0) + 2282 bytes
  [35] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(1, 255, 20, 0) + 272 bytes
  [36] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x11097470, 0, 1, 1) + 773 bytes
  [37] m_interpreter.dll:_inWordsj(2, 0x00cdd91c, 1, 0x00cdd97c) + 441 bytes
  [38] 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
  [39] 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
  [40] 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
  [41] 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
  [42] m_interpreter.dll:_inDispatchFromStack(529, 0x013f783c "jordan", 2, 1) + 891 bytes
  [43] m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x013f783c "jordan", 529, 2, 1) + 111 bytes
  [44] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(1, 115, 23, 0) + 2282 bytes
  [45] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(1, 115, 23, 0) + 272 bytes
  [46] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x110e3f00, 0, 1, 1) + 773 bytes
  [47] m_interpreter.dll:_inWordsj(2, 0x00cde03c, 1, 0x00cde09c) + 441 bytes
  [48] 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
  [49] 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
  [50] 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
  [51] 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
  [52] m_interpreter.dll:_inDispatchFromStack(529, 0x10da9bb5 "jordan", 2, 1) + 891 bytes
  [53] m_interpreter.dll:_inCallFcnFromReference(0, 0x12d907e0, 0x789b59c0, 0xcccccccd) + 176 bytes
  [54] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(1, 0, 2, 0) + 4115 bytes
  [55] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(1, 0, 1, 0) + 272 bytes
  [56] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x11007c80, 1, 0, 0x11007c80) + 773 bytes
  [57] m_interpreter.dll:_inExecCompScript(0, 0x00cde71c, 0x11007c80, 0xffffffff) + 321 bytes
  [58] 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
  [59] 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
  [60] 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
  [61] 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
  [62] m_interpreter.dll:_inDispatchFromStack(485, 0x013f7714 "Untitled", 0, 0) + 891 bytes
  [63] m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x013f7714 "Untitled", 485, 0, 0) + 111 bytes
  [64] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(2, 0, 0, 0) + 2411 bytes
  [65] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(2, 0, 0, 0) + 272 bytes
  [66] m_interpreter.dll:_inInterPcode(2, 0x7876f2d8 "蛤vx苞rx`鹯x喧rx蛤vx仳vx", 0, 0) + 69 bytes
  [67] 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
  [68] m_interpreter.dll:$L72592(0x7876f2d8 "蛤vx苞rx`鹯x喧rx蛤vx仳vx", 0x11076260 "Untitled\n", 9, 0) + 196 bytes
  [69] m_interpreter.dll:enum inExecutionStatus __cdecl inEvalCmdWithLocalReturnandtype(char const *,int *,enum inDebugCheck)(0, 2, 1, 0x00cdf44c "趑�) + 86 bytes
  [70] m_interpreter.dll:_inEvalCmdNoEnd(0x11076260 "Untitled\n", 0x00cdf4e4, 0x00cdf4a0, 0x015c1f28) + 16 bytes
  [71] bridge.dll:_mnParser(0x7c80b6a1, 0x015c1f28, 0, 0) + 431 bytes
  [72] mcr.dll:public: void __thiscall mcrInstance::mnParser(void)(271242, 0x4d5c3a43, 0x414c5441, 0x625c3742) + 87 bytes
  [73] MATLAB.exe:0x00401d2f(4194304, 0, 271242, 0x015c1f28)
  [74] MATLAB.exe:0x00403e45(0x028ddd60, 0x7c92e1fe "副", 0x7ffd3000, 0x80544dfd)
  [75] 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
[result,status] = maplemex(statement);

Error in ==> sym.maple at 85
[result,status] = maple(statement);

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

Error in ==> jordan at 23
   [V,J] = jordan(sym(A));

Error in ==> Untitled at 2  

这就是错误信息!!!

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

[ 本帖最后由 ChaChing 于 2009-12-28 14:27 编辑 ]
发表于 2006-11-20 20:49 | 显示全部楼层
>>  A = gallery(5);
       [V,J] = 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版本的,可以运行的
发表于 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)]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 楼主| 发表于 2006-11-20 23:07 | 显示全部楼层
是装的问题
我现在还是运行不了
符号情形也一样
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-9-24 23:22 , Processed in 0.055698 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表