Trying my script in another MATLAB release
Afficher commentaires plus anciens
Hi, I have MATLAB R2015b, and I have a script I would like to test in another MATLAB release, to see if it still works. I would like my script to be able to run in any release, or at least in as many releases as possible.
If you run it, can you tell me the error message that appears and how I can solve it?
5 commentaires
per isakson
le 12 Jan 2017
On R2016a x1 produces a series of figures. Seems to work; no messages indicated otherwise. However, I interrupted the execution after fourteen figures
Image Analyst
le 12 Jan 2017
Ricardo, please give all the inputs necessary to reproduce the error you see. And give us the actual error message - ALL the red text not just part of it, because we don't seem to have the error you did.
Walter Roberson
le 13 Jan 2017
I read this as asking people to run it in other releases to determine whether the other releases are compatible -- that is, that the user wants to make the code portable and is wondering what changes to make to ensure portability.
Image Analyst
le 13 Jan 2017
Well I thought that too. It's a little unclear though if "the error message" also appears in his R2015a version or not. If there's no error message the only reason I think it wouldn't run in a later version is if he used a deprecated function that has since been removed. And it wouldn't run in an older version if he used a new function that didn't exist in the old version. The help documentation tells whether functions are deprecated and when they were first introduced so that may help him determine compatibility.
Ricardo Boza Villar
le 13 Jan 2017
Réponse acceptée
Plus de réponses (2)
Image Analyst
le 11 Jan 2017
You didn't say what to enter for inputs. I'm running R2016b and I put in 1 for all the inputs and it ran for a while and then crashed with this error message:
To use 'local2globalcoord', the following product must be both licensed and installed:
Phased Array System Toolbox
I don't have that toolbox. I've added it to the Products section above.
3 commentaires
Ricardo Boza Villar
le 12 Jan 2017
Image Analyst
le 12 Jan 2017
You should unaccept this since I really didn't solve anything.
Ricardo Boza Villar
le 12 Jan 2017
Walter Roberson
le 12 Jan 2017
R2014a:
Error using contour3 (line 65)
Too many input arguments.
Error in x1 (line 185)
contour3(x,y,z,30,'-','linewidth',1), title(string_3,'interpreter','latex','FontSize',13), axis equal, pause(2) % pause(0.1)
3 commentaires
Ricardo Boza Villar
le 12 Jan 2017
Walter Roberson
le 12 Jan 2017
The work-around is probably
[~, h] = contour3(x,y,z,30,'-');
set(h, 'LineWidth', 1);
This should work for both R2014a and before, and for R2014b and later. In R2014b and later, h would be a contour object, which has a LineWidth property directly. In R2014a and earlier, in the special case that you specified a linespec (which you did) then the h returned would be a vector of line objects, and those have LineWidth properties too.
If you had not specified '-' then in R2014a and earlier then h would be patch objects -- and they happen to have LineWidth properties as well.
Ricardo Boza Villar
le 13 Jan 2017
Catégories
En savoir plus sur Performance and Memory dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!