How to do function shift in MATLAB?

3 ビュー (過去 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)
Rena Berman
Rena Berman 2019 年 12 月 12 日
(Answers Dev) Restored edit

サインインしてコメントする。

回答 (1 件)

Shubham Gupta
Shubham Gupta 2019 年 10 月 3 日
Try:
function [ func_up ] = FuncShift( func, shift )
func_up = @(x)(func(x)+shift);
end

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by