[Date Index]
[Thread Index]
[Author Index]
Re: Interesting problem looking for a solution.
*To*: mathgroup at smc.vnet.net
*Subject*: [mg122082] Re: Interesting problem looking for a solution.
*From*: DrMajorBob <btreat1 at austin.rr.com>
*Date*: Wed, 12 Oct 2011 03:44:39 -0400 (EDT)
*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com
*References*: <j6rk1f$1nr$1@smc.vnet.net> <201110100826.EAA15321@smc.vnet.net>
*Reply-to*: drmajorbob at yahoo.com
He'd also need to know the random number chosen, would he not?
Bobby
On Tue, 11 Oct 2011 03:25:49 -0500, Murray Eisenberg
<murray at math.umass.edu> wrote:
> With that proposed solution, all the student needs to do to see the
> function's definition is to open the closed cell.
>
> Very low security!
>
> On 10/10/11 4:26 AM, Dr. Wolfgang Hintze wrote:
>> "Church, Gary"<churchg at smccd.edu> schrieb im Newsbeitrag
>> news:j6rk1f$1nr$1 at smc.vnet.net...
>>> Hello,
>>>
>>> I have an (I think) interesting problem for you Mathematica gurus.
>>>
>>> I'm trying to create a worksheet for my students and want to be able
>>> to display the plot of a randomly generated function f[x], without
>>> them being able to access the expression which defines f; In other
>>> words, I don't want them to be able to evaluate f[x].
>>>
>>> The idea is that each student will get a different function f[x] and
>>> will see a different graph and they have to determine the expression
>>> which defines f. They then have to plot the function they think is f
>>> against the actual function f[x] and turn in the two plots (or the
>>> one plot with the two graphs.)
>>>
>>> Is this possible?
>>>
>>> Thanks much,
>>> Gary
>>>
>>
>> Are you looking for something like this?
>> To begin with, define the list lf of possible functions.
>> Then select a definition for f[x] at random from the list, and finally
>> plot it.
>> Repeat the second step (In[219]) as often as you (and your students)
>> like.
>>
>> In[221]:=
>> lf = {x^2, Sin[x], Exp[-x]};
>>
>>
>> In[219]:=
>> f[x_] = lf[[Random[Integer, {1, 2}]]];
>> Plot[f[x], {x, 0, 5}];
>>
>> If you wish to keep the list secret your can hide it from being viewed
>> using the option inspector of the cell (right click> General
>> Properties> Cell Open set to false> Apply).
>>
>> Hope this helps
>> Wolfgang
>>
>>
>
--
DrMajorBob at yahoo.com
Prev by Date:
**Re: Making a function out of repeated hyperbola integrations?**
Next by Date:
**Re: Interesting problem looking for a solution.**
Previous by thread:
**Re: Interesting problem looking for a solution.**
Next by thread:
**Re: Interesting problem looking for a solution.**
| |