Message Boards Message Boards

0
|
3860 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

One question with Manipulate function

Posted 10 years ago
Attachments:
POSTED BY: Hosam Hefnawy
3 Replies

Something like this?

(* Mathematica 7 *)
f[x_] := 1 + 2 x + 3 x^2 + 4 x^4 (*Define the function*)

Manipulate[ 
 Take[f[x], n](*Take n terms*)/. x -> m (*replacing x with some value m*), {n, 1, 4, 1}, {m, 1, 3, 1}, 
 SaveDefinitions -> True,
 ControlType     -> RadioButton ]
POSTED BY: Isaac Abraham

After reading more carefully about the subscripted terms, something like the following?

(* Mathematica 7 *)
f[n_] :=  Sum[ Subscript[a, j], {j, 0, n}](*Define the function*)
Manipulate[ f[n], {n, 0, 4, 1}, ControlType -> RadioButton]
POSTED BY: Isaac Abraham
Posted 10 years ago

The problem is how to write a correct code for the second argument in Manipulate function as follows f[n_] := Manipulate[Evaluate[Sum[Subscript[a, i], {i, 1, n}]], ...........] i.e. what to be written in the space shown in the above function definition. in other words it is needed to define a function can generate the following set {Subscript[a, 1], 0, 1}, {Subscript[a, 2], 0, 1}, {Subscript[a, 3], 0, 1}.....{Subscript[a, 3], 0, 1} to be written in the Manipulate command

POSTED BY: Hosam Hefnawy
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract