Error using mp/subsasgn: Subscripted assignment dimension mismatch.
Jon Vegard 5 years ago • updated by Manolis Chatzis 2 years ago • 13
The following subscript assignment works fine in MATLAB, but not with the MP-toolbox. Obviously workaround exists, but this type of assignments are truly convenient.
A = zeros(3,3,3);
B = ones(3,1);
A(1,1,:) = B;
A = zeros(3,3,3,'mp');
B = ones(3,1,'mp');
A(1,1,:) = B;
Customer support service by UserEcho
Thank you very much for your report on this important issue!
We have just fixed it. Please upgrade to newest version of toolbox - 184.108.40.20672.
Would highly appreciate further feedback.
Please, put the new release note always on your version history page! Other users does not read all notes on this forum.
Same problem on Linux release 4.4.4 Build 12666. When will be available the Linux version of this release?
I replied to your question in different thread: http://mct.userecho.com/forums/1-general/topics/123-new-releases-policy/
Hi, it works fine now.
When I use a parfor-loop instead of a for-loop the accuracy is (some times) reduced to quad precision (the same thing occurs when I am using the symbolic toolbox with the vpa() function). When I tried to create a minimal working example, I failed to reproduce the phenomena (my code is quite large). I guess I could investigate this in detail to find the problem, but this issue might be known to you?
Every instance of MATLAB loads independent copy of toolbox with default settings (precision, etc.).
Thus, precision should be set up globally, using global settings file - see the mpstartup.m script in toolbox directory.
Also please check the mp.NumberOfThreads setting in the script and how to use it for optimal performance with "parfor".
Under "MATLAB instance" I mean the worker in "parfor". MATLAB spawns the required number of workers automatically. Each of them with its own set of toolboxes, etc.
Thanks, that made sense and it works like a charm now.
Thanks again for impressively quick replies and fixes.
Similar error for the following lines:
Error using mp/subsasgn (line 1387)
Subscripted assignment dimension mismatch.
Could you please provide minimal, complete, and verifiable example, so that situation can be reproduced?
Please check the top post on the forum homepage: https://mct.userecho.com/
The following two lines should result in reproducing the error:
Great, thank you for the report!
We have just released updated version of toolbox for Windows. It includes bug fix for this issue among other improvements.
Please download it from our homepage (download trial) or just use this link: https://bit.ly/2XwTWH7
Don't forget to copy your license key to the folder of new toolbox version!
Would appreciate if you would test your code with new toolbox and let me know the results.
We will release Linux & Mac OS versions soon.
Thank you for the fast reply. Yes the new version has resolved this.