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 Kommentare

Paulo Silva
Paulo Silva am 27 Mär. 2011
you already answered your own question!
Mads Svendsen-Tune
Mads Svendsen-Tune am 27 Mär. 2011
How do you mean?

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 28 Mär. 2011

0 Stimmen

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

Weitere Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by