Hi, I know from experience that some Matlab functions like cos will also return a vector if it's input is a vector, i.e. cos(vector) is a vector. Is it possible to do the same with a custom function I've written myself? I am asking this because I want to avoid writing for loops because in Matlab for loops take a long time to execute.
MATLAB: How to return a vector output for a vector input for a custom made function
function
Best Answer