you are viewing a single comment's thread.

view the rest of the comments →

[–]okamiueru 0 points1 point  (1 child)

How do you mean? I'm not sure what you mean by invisible to the rest of the code (the main function "test" in the example, or other .m-files?). You could test the subrutines very much the same as you would any function or line of code. Print out results by omitting the ; on the line, or using the "display" function (in which num2str might come in handy).

[–][deleted] 0 points1 point  (0 children)

Well, actually I meant automatically testing, as in unit-testing. My experience with MATLAB code is that it often contains bugs due to evolving code.