Functions

2 次查看(过去 30 天)
Mads Svendsen-Tune
Mads Svendsen-Tune 2011-3-27
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
f34 = @(x) f(x(3:4));

更多回答(0 个)

类别

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

产品

Community Treasure Hunt

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

Start Hunting!

Translated by