problem with bwmorph function after upgrade

5 Ansichten (letzte 30 Tage)
Ben
Ben am 9 Feb. 2014
Beantwortet: Ben am 10 Feb. 2014
I had some previous version of Matlab installed on my computer running Mac OSX 10.8.5. I installed v2013a on Friday and since then I've been having issues with the function bwmorph. I first noticed the problem because some of my code that worked previously stopped working and gave me errors for bwmoprh. I then tried the code included in the help file and this is the error I get:
BW1 = imread('circles.png');
figure, imshow(BW1)
BW2 = bwmorph(BW1,'remove');
BW3 = bwmorph(BW1,'skel',Inf);
figure, imshow(BW2)
figure, imshow(BW3)
error:
Undefined variable "coder" or class "coder.internal.prefer_const".
Error in images.internal.algbwmorph (line 17)
coder.internal.prefer_const(opStr);
Error in bwmorph (line 133)
[bw, lut] = images.internal.algbwmorph(bwin,op,n);
Edit: I've already tried restarting matlab and that did not help.
  2 Kommentare
Image Analyst
Image Analyst am 9 Feb. 2014
Bearbeitet: Image Analyst am 9 Feb. 2014
Please give the entire error message, including where it mentions the line of your code that produces the error. I'm assuming your m-file is a script of function. Is it a class instead?
Why did you install the old version? If you did it just 2 days ago, why didn't you use the latest, current version R2013b? Do you have the student version where there is no "b" release?
Ashish Uthama
Ashish Uthama am 10 Feb. 2014
Ben, my suspicion is that either its not a clean install or the path is messed up. Inspect your path to ensure that you aren't accidentally mixing MATLAB versions. If that fails, please contact support. (otherwise, unfortunately, my best suggestion is to try a clean, fresh install)

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Ben
Ben am 10 Feb. 2014
You were right there was a problem with the path somehow. I reset the path to default and then added the folders with my scripts and it works without a problem.
Thanks!

Weitere Antworten (0)

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by