I use the following code to define a sparse matrix and then multiply with a scalar:
B(1) = sparse(1,1);B*0
I receive the following segmentation violation:
------------------------------------------------------------------------ Segmentation violation detected at Mon Apr 25 11:00:29 2005 ------------------------------------------------------------------------ Configuration: MATLAB Version: 6.5.1.199709 (R13) Service Pack 1 Operating System: Microsoft Windows XP Window System: Version 5.1 (Build 2600: Service Pack 2) Processor ID: x86 Family 15 Model 2 Stepping 9, GenuineIntel Virtual Machine: Java 1.3.1_01 with Sun Microsystems Inc. Java HotSpot(TM) Client VM (mixed mode) Register State: EAX = 00000000 EBX = 24f81da0 ECX = 00000000 EDX = 00000001 ESI = 24f82100 EDI = 00000000 EBP = 00dfd304 ESP = 00dfd270 EIP = 7a624d8a FLG = 00010246 Stack Trace: [0] numerics.dll:_spmultop(0x24f81da0, 0x24f82100, 2, 1) + 410 bytes [1] numerics.dll:_spBinaryArrayOps(0x24f81d10, 0x24f81650, 2, 1) + 231 bytes [2] numerics.dll:_spBinaryMatrixOps(0x24f81d10, 0x24f81650, 0, 1) + 169 bytes [3] numerics.dll:_spFullBinMatrixTimesFcn(1, 0x00dfd414, 2, 0x00dfd4dc) + 39 bytes [4] m_interpreter.dll:_inExecuteInternalFcn(206, 2, 1, 0) + 1183 bytes [5] m_interpreter.dll:enum opcodes __cdecl inIntFcn(enum opcodes,int,int,int)(77, 0x010000ce, 1, 2) + 90 bytes [6] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,struct inPcodeNest_tag volatile *)(2, 0, 0, 0x012de5e8) + 2554 bytes [7] m_interpreter.dll:_inInterPcode(2, 0x00dfdc54, 0, 0) + 193 bytes <snip>
Best Answer