change variable in function_handle
Show older comments
hello all,
i wanna to change x in f=@(x)sinx to x+2 so that we have g=(x)sin(x+2)
how can i derive g from f in matlab?
thanks alot
Accepted Answer
More Answers (1)
Sulaymon Eshkabilov
on 19 May 2021
f=@(x)sin(x)
g = @(x)f(x+2)
Good luck
1 Comment
saeed rezaei
on 19 May 2021
Categories
Find more on Logical 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!