Hi all.
if a have a function:
x_out = f(x), where x is some vector.
How would i create a new function where a subset of the vector has been given as input:
x_out = f(x(3:4))
Thanks a lot

2 件のコメント

Paulo Silva
Paulo Silva 2011 年 3 月 27 日
you already answered your own question!
Mads Svendsen-Tune
Mads Svendsen-Tune 2011 年 3 月 27 日
How do you mean?

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

 採用された回答

Walter Roberson
Walter Roberson 2011 年 3 月 28 日

0 投票

f34 = @(x) f(x(3:4));

1 件のコメント

Mads Svendsen-Tune
Mads Svendsen-Tune 2011 年 3 月 28 日
Thanks a lot!

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

その他の回答 (0 件)

製品

Community Treasure Hunt

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

Start Hunting!

Translated by