|
From: | Doug Stewart |
Subject: | Re: Indexing functions? |
Date: | Mon, 9 Oct 2017 08:00:35 -0400 |
Hi;
I have a function depends on X and Y. I know X, thats an array so my
function only depends on X
But I want to create an "array of functions" which behave like
f(1)= Y*1^2
f(2)=Y*2^2
f(3)=Y*3^2
.
.
.
I should create different fuctions because every function will be
postprossesed different way in further.
clear
clc
x=1:1:10;
for index=1:1:length(x);
f(index)=@(y) y*x(index).^2;
end
Is there a way to do this?
[Prev in Thread] | Current Thread | [Next in Thread] |