How can I apply a function to every row/column of a matrix in MATLAB?
Asked 07 September, 2021
Viewed 842 times
  • 55
Votes

You can apply a function to every item in a vector by saying, for example, v + 1, or you can use the function arrayfun. How can I do it for every row/column of a matrix without using a for loop?

11 Answer