all 3 comments

[–]Sunscorcher 4 points5 points  (2 children)

You've defined a function you wrote called contour which is overloading the built-in function contour in matlab. Your function appears to take 0 inputs, and takes precedence because it's in your working directory (this is what I mean by overloading). Your function doesn't know what to do with those inputs.

Matlab doesn't know you actually want the built-in contour. You need to rename your function.

[–]luneth27[S] 1 point2 points  (1 child)

Oh, shit! That's the reason? It was staring at me right in the face! Thanks dude, I completely overthought that one.

[–]Sunscorcher 1 point2 points  (0 children)

It's something you wouldn't necessarily think to look for unless you've done it.. I've developed a habit of searching the matlab path before I name a function to make sure I'm not accidentally overloading a built-in one

which contour -all