Why do I receive a bus error or segmentation violation error when there are too many output variables on the left-hand side of an assignment from a structure in MATLAB 7.0 (R14)?
Show older comments
I enter the following code in the MATLAB command prompt:
S.a = [1 2 3];
[x, y, z] = S.a;
and I receive the following bus error:
------------------------------------------------------------------------
Bus error detected at Thu Aug 12 11:28:31 2004
------------------------------------------------------------------------
Configuration:
MATLAB Version: 7.0.0.19901 (R14)
Operating System: Darwin 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug 5 19:26:16 PDT 2004; root:xnu/xnu-517.7.21.obj~3/RELEASE_PPC Power Macintosh
Window System: The XFree86 Project, Inc (40300000), display :0.0
Current Visual: 0x22 (class 4, depth 24)
Virtual Machine: Java 1.4.2_05 with "Apple Computer, Inc." Java HotSpot(TM) Client VM
(mixed mode)
Default Charset: US-ASCII
<snip>
Stack Trace:
[0] libmwm_interpreter.dylib:inMatass1 + 28 bytes
[1] libmwm_interpreter.dylib:inMatAssDispatch + 348 bytes
[2] libmwm_interpreter.dylib:inInterp(inDebugCheck, int, int, opcodes, inPcodeNest_tag volatile*) + 5124 bytes
[3] libmwm_interpreter.dylib:inInterPcodeSJ(inDebugCheck, int, int, opcodes, inPcodeNest_tag*) + 224 bytes
[4] libmwm_interpreter.dylib:in_local_call_eval_function(int*, _pcodeheader*, int*, mxArray_tag**, inDebugCheck) + 176 bytes
<snip>
A similar segmentation violation error is also known to occur for this case.
Accepted Answer
More Answers (0)
Categories
Find more on Parallel Computing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!