I found a function with a "secret" input, which someone can perhaps explain? What could be the reason? Are there many cases of such a thing?
In the documented syntax of radon
function, there are two ways to call the function - the conventional one with inputs of I
and THETA
, (for image and desired projection angles), and also an option to omit THETA
, and give only I
as input.
But in the comments inside the radon.m
file, there is another part at the end, that is described as "grandfathered syntax". This allows three inputs, including also the number of desired projections. And, it really works!
So, why isn't this documented? Has it been available in the past, and then deleted/changed (as "grandfathered syntax" would suggest)? So why does this still work?
And, another question about radon.m
:
The main part of the function is computed by calling another function, called radonc
. What is it? Where does it reside? I can't find it, or any mention of it anywhere.
"Grandfathered" syntax typically means that it's a syntax that
radonc
is in\toolbox\images\images\private
. Thewhich
command won't find it because it's in that private directory, and so can only be called by functions in the directory immediately above (which includesradon
itself). The file isradonc.mexw64
(possibly a different mex file extension if you're on a different platform to me), indicating that it's implemented as compiled C code rather than MATLAB code (and in case this is why you're asking, it means you can't see the source).Edit: Note that in the same directory there is also a file
radonc.m
. This file doesn't do anything, as the mex file has higher precedence; it is there to provide help for theradonc
function. If you typehelp radonc
, you'll see that it shows the help text provided by the comments ofradonc.m
.