Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have a function:

f[x_,y_] = x*y // ScientificForm;
Manipulate[f[x,y], {x, 10^-1, 10^-10}, {y, 0.01, 1, 0.01}]

When I try to execute it - it does work. However I want my x to increment in following manner: for x, 10^-1, 10^-2, 10^-3, ..., 10^-10 and for y, 0.01, 0.02, ..., 0.1, ..., 0.11, ..., till eventually 1;

I can't get my head around this. Could somebody please share any links on how to actually build interface in Mathematica. That would be very much appreciated

share|improve this question
    
You could use Manipulate[f[10^x, y], {x, -10, -1}, {y, 0.01, 1, 0.01}] with the f you already have. Does that do what you want? –  acl Jul 18 at 22:42
    
Thank you, yes it does! –  user18618 Jul 18 at 22:50

2 Answers 2

f[x_, y_] = x*y;

Manipulate[
 f[x, y] // ScientificForm,
 {{x, 10.^-6}, 10.^Range[-1, -10, -1]},
 {{y, .5}, 0.01, 1, 0.01, Appearance -> "Labeled"}]

enter image description here

share|improve this answer

Using the logManipulator from my answer to Logarithmic slider, you can also achieve your objective via

Manipulate[
 f[x, y],
 {x, 10.^-10, 10^-1, 10, logManipulator[##] &},
 {y, 0.01, 1, 0.01}]

Code for logManipulator:

ClearAll[logManipulator];
With[{smallerRule = {Large -> Medium, Medium -> Small, Small -> Tiny}},
 logManipulator[Dynamic[x_], range_: {1, 10}, 
   OptionsPattern[Manipulator]] := With[{
    logrange = Log10[range],
    imagesize = OptionValue[ImageSize] /. Automatic -> Medium,
    inputfieldsize = 
     OptionValue[ImageSize] /. Automatic -> Medium /. smallerRule,
    enabled = OptionValue[Enabled],
    continuousaction = OptionValue[ContinuousAction],
    appearance = 
     First[Cases[OptionValue[Appearance], 
        Tiny | Small | Medium | Large] /. {} -> {Automatic}],
    labeled = ! FreeQ[OptionValue[Appearance], "Labeled"] || ! 
       FreeQ[OptionValue[AppearanceElements], "InlineInputField"],
    opener = 
     OptionValue[AppearanceElements] /. {Automatic -> True, 
       All -> True, None -> False, 
       l_List :> (Cases[l, Except["InlineInputField"]] =!= {})},
    inputfield = 
     MatchQ[OptionValue[AppearanceElements], Automatic | All] ||
      ! FreeQ[OptionValue[AppearanceElements], "InputField"],
    appearanceelements = 
     OptionValue[AppearanceElements] /. {Automatic -> All, None -> {},
        l_List :> Cases[l, Except["InlineInputField" | "InputField"]]},
    autoaction = OptionValue[AutoAction],
    exclusions = OptionValue[Exclusions]},
   ReleaseHold@MakeExpression[
     PaneBox[
      DynamicModuleBox[{
        Typeset`open$$ = ! FreeQ[OptionValue[Appearance], "Open"],
            Typeset`paused$$ = OptionValue[PausedTime],
        Typeset`rate$$ = OptionValue[AnimationRate],
            Typeset`dir$$ = OptionValue[AnimationDirection]},
       StyleBox[
        DynamicBox[
         FEPrivate`FrontEndResource["FEExpressions", "Manipulator04"][
          Dynamic[x],
          Dynamic[Log10[x], (x = 10^#) & ],
          logrange,
          imagesize,
          inputfieldsize,
          enabled,
          continuousaction,
          appearance,
          labeled,
          opener,
          inputfield,
          appearanceelements ,
          autoaction,
          exclusions,
          Dynamic[Typeset`open$$],
              Dynamic[Typeset`paused$$],
          Dynamic[Typeset`rate$$],
              Dynamic[Typeset`dir$$]]],
        DynamicUpdating -> True],
       DynamicModuleValues :> {}],
      BaselinePosition -> (OptionValue[BaselinePosition] /. Automatic -> Baseline),
      ImageMargins -> OptionValue[ImageMargins]],
     StandardForm]]
 ]
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.