How to modify a function handle?
51 views (last 30 days)
Sorry I am not sure how to phrase the question but say I had a function handle say: myfun1 = @(y) y
Would I be able to modify that function and say something like myfun2 = @(y) myfun1*2
So when I write myfun2(5) it will return 10.
I essentially want to perform arithmetic on expressions representing functions of x to obtain other functions of x.