Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Evaluating a function in an array.' topicStudent Support Forum > General > Archives > "Evaluating a function in an array."

Next Comment >Help | Reply To Topic
Author Comment/Response
Jonathan Stallings
02/24/09 10:35pm

Hello all,

I am trying to first define an array as a series of functions that I can evaluate. Here is an example:

SampleArray[x_] := {Exp[x], x, 2 x}

This works fine. My problem is that I am trying to create this kind of array inside of a loop. Each iteration of the loop finds the next element of the array. Here is what I guessed the code to look like:

SampleArray[[i]][x_] := ix .

This is not exactly what I am using but it gets my point across. I eventually hope to be able to plot all of my functions on one graph which shouldn't be a problem since SampleArray is already defined as an array of functions. Does anyone know how I can define an array of functions each element at a time?

-Jonathan Stallings



URL: ,

Subject (listing for 'Evaluating a function in an array.')
Author Date Posted
Evaluating a function in an array. Jonathan Sta... 02/24/09 10:35pm
Re: Evaluating a function in an array. ES 03/04/09 12:13pm
Re: Re: Evaluating a function in an array. yehuda ben-s... 03/05/09 3:15pm
Re: Evaluating a function in an array. yehuda ben-s... 03/04/09 12:49pm
Next Comment >Help | Reply To Topic