I would like to know if it\'s possible to use a colon \":\" as argument of a function.
Something like that:
function y=func(x)
if
No, it's not possible to pass a colon as an argument (it doesn't make any sense).
You can override both for your own classes:
classdef MyClass
properties(Access=public)
data
end
methods
function out = end(A,k,n)
disp(A);
disp(k);
disp(n);
out = [];
end
function B = subsref(A,S)
disp(S);
B = [];
end
end
end
As for functions, I never heard of such a functionality.