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


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

Re: Suppress Resizing in Manipulate[expr].

From Bob Hanlon <hanlonr357@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Suppress Resizing in Manipulate[expr].
Date 2012-10-10 05:27 +0000
Message-ID <k530v4$92d$1@smc.vnet.net> (permalink)
References <20121009043647.7E225685E@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


Manipulate[
 Row[{
   "Volatility:"^Style["1", White],
   NumberForm[vol // N, {4, 3}],
   Spacer[12],
   "Strike Price: ",
   NumberForm[strike, {6, 5}],
   Spacer[12],
   "Expiration: ",
   NumberForm[expiry // N, {6, 5}],
   Spacer[20],
   NumberForm[
    FinancialDerivative[
     {"BarrierDownIn", "European", "Put"},
     {"StrikePrice" -> strike,
      "Expiration" -> expiry,
      "Barrier" -> 11/10,
      "Rebate" -> 0},
     {"CurrentPrice" -> 12/10,
      "Dividend" -> 0,
      "Volatility" -> vol,
      "InterestRate" -> 1/100}],
    {7, 6}]}],
 Row[{
   Control[{{vol, .1, "Volatility\n"}, .1, .7,
     Appearance -> "Labeled", ImageSize -> Small}],
   Control[{{strike, 1, "Strike\nPrice"}, 1, 2,
     Appearance -> "Labeled", ImageSize -> Small}],
   Control[{{expiry, .25, "Expiration\n"}, .25, 1.5,
     Appearance -> "Labeled", ImageSize -> Small}]}]]


Bob Hanlon


On Tue, Oct 9, 2012 at 12:36 AM, Matthias Bode <lvsaba@hotmail.com> wrote:
> Hola:
> The documentation shows how to suppress resizing in Manipulate[Plot[]].
> I want to suppress resizing in
> Manipulate[{"vol:", N[vol, 4],      "strike:", N[strike, 6],   "expiry:", N[expiry, 6],      N[FinancialDerivative[         {"BarrierDownIn",        "European", "Put"},          {"StrikePrice" -> strike,            "Expiration" -> expiry,            "Barrier" -> 11/10,            "Rebate" -> 0},          {"CurrentPrice" -> 12/10,   "Dividend" -> 0,            "Volatility" -> vol,            "I nterestRate" -> 1/100}],        6]}, {{vol, 1/10}, 1/10,      7/10}, {{strike, 1}, 1, 2},    {{expiry, 1/4}, 1/4, 6/4}]
> How?
> (Using NumberForm[] almost suppresses resizing; but, alas, not totally.)
>
> Best regards,
>
> MATTHIAS BODE
> S 17.36398=B0, W 66.21816=B0,2'590 m. AMSL.

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


Thread

Re: Suppress Resizing in Manipulate[expr]. Bob Hanlon <hanlonr357@gmail.com> - 2012-10-10 05:27 +0000

csiph-web