I have ct data that I want to process but the function either has to read the data out of a .raw-file before it can process it or it can use it immediately in case it has already been extracted from the file prior to that. So it would be convenient to have a function that either takes the file name or the ct data together with a variable that has information about the spatial dimensions of the ct data:
Usually I'd use the inputParser class for optional arguments but I'm not sure if this is possible: If filePath is set it would still be possible to give the other two arguments (but it shouldn't be) and if ct is set it would still wouldn't be an error to not include ctDimension (but it should).
In default implementations it seems to be possible: many functions (e.g. the interp2 function) have different possible sets of required arguments (e.g. either V,k or X,Y,V,Xq,Yq and also optional arguments)
I'd just like to know how to do that if it's possible.