Clear Filters
Clear Filters

Functions

2 views (last 30 days)
Mads Svendsen-Tune
Mads Svendsen-Tune on 27 Mar 2011
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 Comments
Paulo Silva
Paulo Silva on 27 Mar 2011
you already answered your own question!
Mads Svendsen-Tune
Mads Svendsen-Tune on 27 Mar 2011
How do you mean?

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 28 Mar 2011
f34 = @(x) f(x(3:4));

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!