声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1769|回复: 6

[编程技巧] 为何会出现如下错误?

[复制链接]
发表于 2007-5-29 16:46 | 显示全部楼层 |阅读模式

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

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

x
1. Send this crash report to segv@mathworks.com for automated analysis.
     For your convenience, this information has been recorded in:
       C:\DOCUME~1\donglx\LOCALS~1\Temp\matlab_crash_dump.3188
  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 probl
em
       - Any error messages displayed prior to this crash report
     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 ==> E:\导出ANSYS模型的质量和刚度矩阵\cm.m
On line 8  ==> save k.txt K -ascii


程序如下:
clear all
load E:\导出ANSYS模型的质量和刚度矩阵\filestiffness.txt;
K=sparse(8922,8922);
for n=1:89103
    K(filestiffness(n,1),filestiffness(n,2))=filestiffness(n,3);
end
clear filestiffness
save K.txt K -ascii


如果把K=sparse(8922,8922)去掉,就不会错了.但是如果去掉了会在运行一段时间后:out of memory

[ 本帖最后由 yxb345 于 2007-5-29 17:48 编辑 ]
回复
分享到:

使用道具 举报

发表于 2007-5-29 16:52 | 显示全部楼层
load E:\导出ANSYS模型的质量和刚度矩阵\filestiffness.txt;  可能出错在这

filestiffness.txt; 最好放到 你允许程序的根目录下。
发表于 2007-5-29 17:14 | 显示全部楼层
原帖由 pengweicai 于 2007-5-29 16:52 发表
load E:\导出ANSYS模型的质量和刚度矩阵\filestiffness.txt;  可能出错在这

filestiffness.txt; 最好放到 你允许程序的根目录下。


恩,而且最好不要使用中文路径
 楼主| 发表于 2007-5-29 17:44 | 显示全部楼层
clear all
load filestiffness.txt;
K=sparse(8922,8922);
for n=1:89103
    K(filestiffness(n,1),filestiffness(n,2))=filestiffness(n,3);
end
clear filestiffness
save K.txt K -ascii


改了之后情况依然存在!!!!       K矩阵已经生成,就是不能保存.

[ 本帖最后由 yxb345 于 2007-5-29 17:55 编辑 ]
 楼主| 发表于 2007-5-29 17:58 | 显示全部楼层
详细错误码如下:


---------------------------------------------------------------------
       Segmentation violation detected at Tue May 29 17:51:22 2007
------------------------------------------------------------------------
Configuration:
  MATLAB Version:   6.5.0.180913a (R13)
  Operating System: Microsoft Windows XP
  Window System:    Version 5.1 (Build 2600: Service Pack 2)
  Processor ID:     x86 Family 15 Model 2 Stepping 7, GenuineIntel
  Virtual Machine:  Java 1.3.1_01 with Sun Microsystems Inc. Java HotSpot(TM) Client VM
    (mixed mode)
Register State:
  EAX = 00000000  EBX = 00000000
  ECX = 000022da  EDX = 162d00b0
  ESI = 103dfb18  EDI = 77c10e13
  EBP = 00dfcc20  ESP = 00dfcbec
  EIP = 7a83fcdf  FLG = 00010246
Stack Trace:
  [0] m_interpreter.dll:void __cdecl saveascii(struct mxArray_tag *,int)(0x14e824d8, 8922, 4, 0x0142b570) + 319 bytes
  [1] m_interpreter.dll:void __cdecl SaveToAsciiFile(int,char * *,int)(0x14e77f30, 0x00dfd300, 0x14e862b8, 0x014316b1) + 160 bytes
  [2] m_interpreter.dll:_inSaveFcnWithLHS(940, 0x01430a50 "k.txt", 1, 0x00dfd300) + 717 bytes
  [3] m_interpreter.dll:_inSaveFcn(940, 0x01430a50 "k.txt", 1, 0x00dfd300) + 44 bytes
  [4] m_interpreter.dll:_inFullSaveFcn(1, 0x00dfd414, 3, 0x014316b0) + 968 bytes
  [5] m_interpreter.dll:_inExecuteInternalFcn(465, 3, 0, 0) + 1183 bytes
  [6] m_interpreter.dll:enum opcodes __cdecl inIntFcn(enum opcodes,int,int,int)(77, 0x010001d1, 0, 3) + 90 bytes
  [7] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,struct inPcodeNest_tag volatile *)(2, 0, 0, 0x014b4f58) + 2554 bytes
  [8] m_interpreter.dll:_inInterPcode(2, 0x00dfdc54, 0, 0) + 193 bytes
  [9] m_interpreter.dll:enum inExecutionStatus __cdecl in_local_call_eval_function(int *,struct _m_parser_interface *,struct _pcodeheader *,int *,struct mxArray_tag * * const,enum inDebugCheck)(0, 0x7a87fa78, 0x00dfdc54, 0x00dfdcf8) + 174 bytes
  [10] m_interpreter.dll:_inEvalStringWithIsVarFcn(0x14ee3010 "save k.txt K -ascii\n", 20, 0, 0) + 531 bytes
  [11] m_interpreter.dll:_inEvalString(0x14ee3010 "save k.txt K -ascii\n", 20, 0, 0) + 50 bytes
  [12] m_interpreter.dll:enum inExecutionStatus __cdecl inEvalCmdWithLocalReturnandtype(char const *,int *,enum inDebugCheck)(0x14ee3010 "save k.txt K -ascii\n", 0, 2, 0x00dfde30) + 68 bytes
  [13] m_interpreter.dll:_inEvalCmdNoEnd(0x14ee3010 "save k.txt K -ascii\n", 1, 0x0047f617, 11) + 16 bytes
  [14] matlab.exe:_mnParser(0x027edf4c, 271244, 0, 48) + 1001 bytes
  [15] matlab.exe:_WinMain@16(4194304, 0, 271244, 1) + 3872 bytes
  [16] matlab.exe:_WinMainCRTStartup(0x027edf4c, 24, 0x7ffde000, 0x8054bb38) + 308 bytes
  [17] kernel32.dll:0x7c816fd7(0x0047172c, 0, 0, 0)
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\donglx\LOCALS~1\Temp\matlab_crash_dump.3740
  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 prior to this crash report
     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.
 楼主| 发表于 2007-5-29 20:52 | 显示全部楼层
去掉SAVE那一行命令后我对K求值,det(K),得到的是NaN,为什么?

[ 本帖最后由 yxb345 于 2007-5-29 20:54 编辑 ]
发表于 2007-5-29 21:16 | 显示全部楼层
估计是矩阵太大了,建议分批存储吧
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-9-24 07:26 , Processed in 0.054515 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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