A problem with section of code days after entered

My code out of nowhere started malfunctioning. I tried everything I could think of. I found an old GUI and it started working making me realize it was the adjustment I made many runs and days ago. To confirm, I took this snippet out of the problematic GUIs and it started working again. Here is the code in question:
axis tight
camlight
shading interp
colormap(jet(256))
I used it after Surf(M) to give my surf plot better visuals and I took this code from a answer I found here on MatAnswers
My question is do I have to worry about this happening in the future now that I have changed the code to:
camlight left;
lighting phong
Has anyone found the code I entered problematic? I am worried because I am about to give this code to someone to use as a new program for them. So I won't be there if it goes wrong again. Thanks.

4 Comments

Please explain on what the symptom is of it "malfunctioning" ?
I don't understand, so let's break this down:
  1. My code out of nowhere started malfunctioning. I tried everything I could think of. OK, fine. You have a gui that quit working.
  2. I found an old GUI and it started working making me realize it was the adjustment I made many runs and days ago. Is this an old, prior version of the same GUI in number 1 that just quit working? So now it started working (meaning the old one was also broken before now)? So the old one was not working, but some number of days ago you made an adjustment that enabled it to now work? So why didn't you quit while you were ahead? It's working. Did you need to make changes to it?
  3. To confirm, I took this snippet out of the problematic GUIs and it started working again. But you just said in #2 that it was working, so what do you mean by "again"? How did it break between #2 and #3? You left that part out.
Okay sorry. My GUI, let's call it A, I added a snippet to make the surf plot easier to look at. I did this two days ago and have run through the code like a 100 times. Then yesterday, once I selected one button, all the other buttons stopped working. So I went to an old GUI, let's call it B, which has the same coding except for the adjustment to the surf plot, and it worked. I figured out here that the problem must be the adjustment to the surf plot. I then tried GUI A and took out the additional surf coding and it worked. What I am asking is if anyone has had a problem with the code
"camlight left;
lighting phong"
because without adjusting, the Surf Plot is really terrible to look at and interpret. This is a different code than the one that was not letting me select any buttons.
What should we be looking for to determine whether it is working or broken? is it producing an error message for you? Is the surface disappearing?

Sign in to comment.

Answers (0)

Tags

Asked:

on 3 Sep 2015

Commented:

on 4 Sep 2015

Community Treasure Hunt

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

Start Hunting!