Error using matlab.gra​phics.axis​.Axes/set

7 views (last 30 days)
Hello Experts,
As i am running one protected file(.p - sorry it’s confidential so that even i am not able to see that). It runs all the way through second last stage and at the end it shows the error
Error using ‘matlab.graphics.axis.Axes/set’, ‘Value must be a lx2 vector of numeric type in which the second element is greater than the first element or is inf.’
I have already tried ‘bdstop if error’ but it shows your file is not currently in a debuggable state-skipping the frame. i am using matlab version 2020a. Is this error has anything to do with matlab version or tool?
Is there any other way to find out the reason for the error. Thank you in advance for your helpful suggestions.
Regards, Romil
  4 Comments
Chang
Chang on 8 Mar 2023
@Walter Roberson So gratful for your reply!.p or .a you mentioned means the name of files or something else? I standarded my processing of data again and the error above did not occur.But this time the system reminds me that my data is too short when erp image is plotting. So I prepare to modify my experiment. :D
Walter Roberson
Walter Roberson on 8 Mar 2023
MATLAB uses several different file extensions. The main one containing text matlab code is files with ".m" file extension. Livescript files contain text code but also possibly more have ".mlx" extension. Simulink models are ".slx" or (older) ".mdl" file extensions.
The file extension ".p" is used for ".m" files that have been "protected". You cannot read the source code for such files but they can be executed.
When you have a .p file like Romil had, it is difficult to debug.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 15 Jul 2020
That error occurs when you use xlim() or ylim() or zlim() and what you pass to it is not a vector of two values in increasing order. It would, in particular, happen if you passed it a vector of two equal values.
You could try
dbstop if caught error
However, if the code is directly doing the equivalent of xlim() or ylim() or zlim() then you would have difficulty tracking the problem.
The equivalents of the xlim(), ylim(), zlim() calls are setting the XLim, YLim, or ZLim properties.
The problem is more likely to be due to a logic problem than a difference in version. The version differences tend to show up in other ways.
It sounds as if you are probably working with a commercial organization; if so, then the organization can get older versions of MATLAB for you so that you can test out the hypothesis that the version is the problem. Commercial licenses (all licenses except possibly Student licenses, really) can download and run any version of MATLAB up to the latest release that has been paid for; there is no cost to access an older release.
  2 Comments
ROMIL ANTALA
ROMIL ANTALA on 15 Jul 2020
Thank you for your reply.
Your suggestions are very logical. Even i also know the cause of error but i can not change anything in protected file which i am running and thats the main problem. So i think i should give a try in older version for cross check and see.
Chang
Chang on 7 Mar 2023
Actually I am using the older version but nothing has changed.Crying.

Sign in to comment.

More Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!