Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13900

rookie code issue

From robholman@gmail.com
Newsgroups comp.soft-sys.math.mathematica
Subject rookie code issue
Date 2013-03-20 08:22 +0000
Message-ID <kibrkj$156$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


Hi folks:

I'm working on a bit of code in which I want students to choose a trig function from a drop-down menu, and then from there have some choices for viewing the graph. All is working fine except for one thing. There are a couple of constants that depend on the function they choose from the menu, and I'm trying to define the constant based on their choice for f. The basic issue I'm having boils down to the following question:

Why doesn't the following code return a 2?


m = Cos;
Which[m == Sin, 5, m == Cos, 2]



Thanks for the help!

Rob

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

rookie code issue robholman@gmail.com - 2013-03-20 08:22 +0000
  Re: rookie code issue Daniel Huber <danielphuber@gmail.com> - 2013-03-21 04:54 +0000
  Re: rookie code issue David Bailey <dave@removedbailey.co.uk> - 2013-03-21 04:55 +0000

csiph-web