How to do function shift in MATLAB?

30 visualizaciones (últimos 30 días)
H
H el 3 de Oct. de 2019
Comentada: Rena Berman el 12 de Dic. de 2019
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 comentarios
Stephen23
Stephen23 el 27 de Nov. de 2019
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)
Rena Berman
Rena Berman el 12 de Dic. de 2019
(Answers Dev) Restored edit

Iniciar sesión para comentar.

Respuestas (1)

Shubham Gupta
Shubham Gupta el 3 de Oct. de 2019
Try:
function [ func_up ] = FuncShift( func, shift )
func_up = @(x)(func(x)+shift);
end

Categorías

Más información sobre Google en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by