Subtract function from array
Show older comments
Hi, I have a list of x/y coordinates. Is there an easy way to subtract a function (y = f(x)) from all y data? Thanks a lot!
Jacob
Accepted Answer
More Answers (2)
Jaap
on 13 Dec 2011
0 votes
Walter Roberson
on 16 Jan 2012
arrayfun(@(x, y) y - f(x), x, y)
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!