How to do function shift in MATLAB?

6 次查看(过去 30 天)
H
H 2019-10-3
评论: Rena Berman 2019-12-12
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
Stephen23 2019-11-27
Original question from Google Cache:
"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
Shubham Gupta 2019-10-3
Try:
function [ func_up ] = FuncShift( func, shift )
func_up = @(x)(func(x)+shift);
end

类别

Help CenterFile Exchange 中查找有关 Google 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by