MATLAB: Do I receive an error when running UPDATEXPCENV

targetramsizembupdatexpcenvxpcxPC Target Embedded Optionxpcpatchkernal

Why do I receive an error when running UPDATEXPCENV?
I have already performed all of the steps in XPCSETUP. Now, when I try to run the following code:
updatexpcenv
I receive the following error:
??? In an assignment A(:) = B, the number of elements in A and B
must be the same.
Error in ==> C:\MATLAB6p1\toolbox\rtw\targets\xpc\xpc\private\xpcpatchkernel.m
On line 43 ==> image(MemoryIndex:MemoryIndex+2)=memory;
Error in ==> C:\MATLAB6p1\toolbox\rtw\targets\xpc\xpc\private\xpcpatch.m
On line 9 ==> xpcpatchkernel(propval);
Error in ==> C:\MATLAB6p1\toolbox\rtw\targets\xpc\xpc\updatexpcenv.m
On line 50 ==> xpcpatch(newpropval);

Best Answer

This is a limitation of xPC Target 1.3 (R12.1). The problem is with the "TargetRAMSizeMB" field of the XPCSETUP GUI.
As a workaround, make sure that this field is set to a value less than 1000.