Reputation: 10996
I am using Matlab and I want to make a method work with various Matlab versions. So, I have something like:
v = VideoReader('Video.mpg');
% Check if a particular method exists
if any(strcmp(methods(v), 'getFrame'))
% if the method exists, store it in a variable
end
Now what I want to do is that if this method exists i.e. if the statement above returns true, I want to store a handle to that method in a variable and be able to call it on the VideoReader object. However, I am not sure how to do that.
Upvotes: 1
Views: 39