Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #9953 > unrolled thread
| Started by | John Fultz <jfultz@wolfram.com> |
|---|---|
| First post | 2012-05-04 10:27 +0000 |
| Last post | 2012-05-04 10:27 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Problem in using preassigned variable in manipulate John Fultz <jfultz@wolfram.com> - 2012-05-04 10:27 +0000
| From | John Fultz <jfultz@wolfram.com> |
|---|---|
| Date | 2012-05-04 10:27 +0000 |
| Subject | Re: Problem in using preassigned variable in manipulate |
| Message-ID | <jo0atu$c9r$1@smc.vnet.net> |
There are several ways to do this. In this case, I would use With:
With[{x=.5}, g=Manipulate[=85]]
This literally substitutes .5 into the resulting expression before it's
evaluated. Another common possibility is to assign it to a
DynamicModule variable, which will remain present and properly
initialize in the resulting CDF:
DynamicModule[{x=.5}, g=Manipulate[=85]]
Sincerely,
John Fultz
jfultz@wolfram.com
User Interface Group
Wolfram Research, Inc.
On May 3, 2012, at 9:24 PM, Pooja Tewari wrote:
> Hi,
>
> I am new to Mathematica and I have been stuck with this seemingly
small issue for some time now -
>
> x:=.5;
>
> g = Manipulate[
> Plot[Sin[i t], {t, 0, 10},
> ImageSize -> Scaled[x]], {i, 1, 5}]
>
> I want to assign the variable x to .5 and then use it in Manipulate
function, which plot a graph of sin[i t] and imagesize should be scaled
to x( which is already assigned). But when I am deploying this in cdf, I
am having this error
>
> "The specified setting for the option GraphicsBoxOptions, ImageSize
cannot be used."
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web