Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10134 > unrolled thread
| Started by | "Physics is Everything....Almost" <fizzycist@knology.net> |
|---|---|
| First post | 2012-05-18 09:30 +0000 |
| Last post | 2012-05-20 06:35 +0000 |
| Articles | 5 — 5 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
problem with Manipulate "Physics is Everything....Almost" <fizzycist@knology.net> - 2012-05-18 09:30 +0000
Re: problem with Manipulate Dushan Mitrovich <dushanm@nnips.net> - 2012-05-19 09:49 +0000
Re: problem with Manipulate esetlzn <esetlzn@gmail.com> - 2012-05-19 09:51 +0000
Re: problem with Manipulate DC <b.gatessucks@gmail.com> - 2012-05-19 09:52 +0000
Re: problem with Manipulate Peter Breitfeld <phbrf@t-online.de> - 2012-05-20 06:35 +0000
| From | "Physics is Everything....Almost" <fizzycist@knology.net> |
|---|---|
| Date | 2012-05-18 09:30 +0000 |
| Subject | problem with Manipulate |
| Message-ID | <jp54ri$gq0$1@smc.vnet.net> |
Why does Manipulate[ Plot[Sin[x (1+ a x)], {x,0,6} ], (a,0,2} ] work....
BUT..... the following doesn't....
tmp = Plot[Sin[x (1+ a x)], {x,0,6} ]
Manipulate[ tmp , (a,0,2}]
I checked Attributes of Manipulate and saw HoldAll......but Hold what??
thanks.....Jerry Blimbaum
[toc] | [next] | [standalone]
| From | Dushan Mitrovich <dushanm@nnips.net> |
|---|---|
| Date | 2012-05-19 09:49 +0000 |
| Message-ID | <jp7qak$qhk$1@smc.vnet.net> |
| In reply to | #10134 |
Physics is Everything....Almost wrote:
> Why does Manipulate[ Plot[Sin[x (1+ a x)], {x,0,6} ], (a,0,2} ] work....
> BUT..... the following doesn't....
> tmp = Plot[Sin[x (1+ a x)], {x,0,6} ]
> Manipulate[ tmp , (a,0,2}]
The opening paren should be a brace .
> I checked Attributes of Manipulate and saw HoldAll......but Hold what??
> thanks.....Jerry Blimbaum
>
[toc] | [prev] | [next] | [standalone]
| From | esetlzn <esetlzn@gmail.com> |
|---|---|
| Date | 2012-05-19 09:51 +0000 |
| Message-ID | <jp7qef$qj3$1@smc.vnet.net> |
| In reply to | #10134 |
于 12-5-18 下午5:30, Physics is Everything....Almost 写道:
> Why does Manipulate[ Plot[Sin[x (1+ a x)], {x,0,6} ], (a,0,2} ] work....
> BUT..... the following doesn't....
> tmp = Plot[Sin[x (1+ a x)], {x,0,6} ]
> Manipulate[ tmp , (a,0,2}]
> I checked Attributes of Manipulate and saw HoldAll......but Hold what??
> thanks.....Jerry Blimbaum
>
Hi, no definition of the "a" in the "tmp" results in the problem.
My solution is as below:
f[a_] := Plot[Sin[x (1 + a x)], {x, 0, 6}];
Manipulate[f[a], {a, 0, 2}]
enjoy!
--- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---
[toc] | [prev] | [next] | [standalone]
| From | DC <b.gatessucks@gmail.com> |
|---|---|
| Date | 2012-05-19 09:52 +0000 |
| Message-ID | <jp7qgc$qjp$1@smc.vnet.net> |
| In reply to | #10134 |
Try :
tmp[a_] := Plot[Sin[x (1 + a x)], {x, 0, 6}];
Manipulate[tmp[a], {a, 0, 2}]
[toc] | [prev] | [next] | [standalone]
| From | Peter Breitfeld <phbrf@t-online.de> |
|---|---|
| Date | 2012-05-20 06:35 +0000 |
| Message-ID | <jpa3be$454$1@smc.vnet.net> |
| In reply to | #10134 |
"Physics is Everything....Almost" wrote:
> Why does Manipulate[ Plot[Sin[x (1+ a x)], {x,0,6} ], (a,0,2} ] work....
> BUT..... the following doesn't....
> tmp = Plot[Sin[x (1+ a x)], {x,0,6} ]
> Manipulate[ tmp , (a,0,2}]
> I checked Attributes of Manipulate and saw HoldAll......but Hold what??
> thanks.....Jerry Blimbaum
>
Manipulate doesn't know, that tmp is dependend on a. So write instead:
tmp[a_] := Plot[Sin[x (1 + a x)], {x, 0, 6}]
Manipulate[tmp[a], {a, 0, 2}]
--
_________________________________________________________________
Peter Breitfeld | Bad Saulgau, Germany | http://www.pBreitfeld.de
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web