It seems to me, generate.m has nothing to do with interpolation and is a valid Red Pitaya Matlab client function. I suggest moving it one directory up & setting the PATH accordingly.