Hi! Jakob. When I tried the parameter "weight" and gave a 1xn weight vector, it responsed : w is not a 'function_handle'. Did I get it right that I have to provide a weightting function here? or a weight vector is just enough.
btw, excellent code! thank you very much! It's really inspiring!