How to do function shift in MATLAB?
6 次查看(过去 30 天)
显示 更早的评论
Hello, I was wondering how can I do the function shinfting in MATLAB?
For example:
Input: f(x) = x+2 (a function) and 5 (the shifting value)
Output: f(x+5) = x+7 (a function)
2 个评论
Stephen23
2019-11-27
"How to do function shift in MATLAB?"
Hello, I was wondering how can I do the function shinfting in MATLAB?
For example:
Input: f(x) = x+2 (a function) and 5 (the shifting value)
Output: f(x+5) = x+7 (a function)
回答(1 个)
Shubham Gupta
2019-10-3
Try:
function [ func_up ] = FuncShift( func, shift )
func_up = @(x)(func(x)+shift);
end
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Google 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!