Skip to content

comp.soft-sys.math.mathematica

Home arrow Newsgroups arrow comp.soft-sys.math.mathematica


comp.soft-sys.math.mathematica
Mathematica discussion group. (Moderated)

  • Re: locally changing Options
    Did you actually try this yourself? It goes into an infinite iteration,
    since you can not unblock a symbol once it is blocked (a pity b.t.w), and
    Mathematica evaluates heads of expressions before anything else.
    Regards,
    Leonid

  • Re: windows 64 vs 32 bit
    The big advantage of 64-bit Windows, is that it has an enormous virtual
    address space of approx 1.8 x 10^19 bytes, unlike 32-bit windows, which
    has a theoretical maximum address space of approx 4 x 10^9. In practice,
    this means that memory can be used more effectively.
    The Windows version of Mathematica has both 32 and 64 bit versions

  • Re: elementary questio about packages
    If you are going to return a symbol (L in this case), then perhaps you
    should let the user specify the symbol. Note that this is how functions
    like Solve,Root,NMinimize, etc that return symbols are implemented. The
    following would go in your package (the only change is putting L_ in the
    argument of the trivialfunc):

  • Re: bad Mathieu functions
    Use greater WorkingPrecision.
    Plot[I ce1[3, q, I], {q, 0, 100},
    WorkingPrecision -> 30,
    PlotRange -> {-1, 1} 5]
    David Park
    djmp...@comcast.net
    [link]
    I am no expert in Mathieu functions, but I don't think this gives the right
    result:
    ce1[r_, q_, z_] := MathieuCPrime[MathieuCharacter isticA[r, q], q, z]

  • visible and invisible button
    I want to create buttons in GUIkit. One button say(Button A), and the other say(Button B). Button A appears on the screen but Button B not at start of the program. When I pressed Button A then Button B appears on the screen. When I pressed Button A second time Button B disapears again. How can I do this? I need example source for this.

  • Re: bad Mathieu functions
    Nevermind. I think I'm getting the point (thanks gekko for detailed reply).
    With MachinePrecision, Mathematica doesn't keep track of precision (in the interest of speed), so there is no way to issue a warning since Mathematica doesn't know the precision of the result. If I specify the precision xplicitly (using tick marks) Mathematica will keep track of precision (making it a bit slower), and then I'll know the precision of the result.

  • Re: Mathieu function zeros
    David Park posted a message on 10 March, 2010 where he mentioned using
    my RootSearch package for problems such as finding roots of Mathieu
    functions.
    David was right that RootSearch is very good at finding zeros where a
    function does not change sign. If you have a specific example that is a
    problem send me an email at ( Ted.Er...@navy.mil ) and I will trouble

  • Re: locally changing Options
    Hi David,
    Your suggestion was the first thing that came also to my mind. But there may
    be instances where you don't want to do it, particularly when RowReduce (or
    whatever function) is a part of larger functionality to which you either
    don't have access or which you don't want to change/rewrite (for example, it

  • Re: windows 64 vs 32 bit
    I believe you would only get an advantage if you also got extra ram and
    actually used it. The speed performance might be slightly worse because the
    processors are doing slightly more work to compute addresses. (You might get
    better expert advice on this.)
    David Park
    djmp...@comcast.net
    [link]

  • Re: elementary questio about packages
    Hi,
    I think this example is one of those where there is absolutely no gain
    in providing the results as a list of rules. Although many Mathematica
    functions do so, there are just as many which don't! Returning results
    in the form of rules ony makes sense when there are symbol names
    provided with the call of the function, e.g. as in Solve, NSolve,

  • Re: locally changing Options
    Hi Peter,
    Interesting - I never tried this package out. It however has a fault of not
    protecting against exceptions being thrown somewhere in the code. I just
    tried it and found that in this case the option of interest gets globally
    changed after the code executes. With that fixed, this package may be a good

  • Using Piecwise with FourierTransform can cause kernel crash, version 7
    Using version 7 on windows XP SP2.
    I was trying to find the CTFT (fourier transform) of a delayed windowed
    cosine signal. i.e. a cosine which only extent over some time interval, and
    then the signal is zero everywhere else. But the window can be shifted in
    time.
    First, I used Piecwise to define the signal. Then I call FourierTransform.

  • Re: locally changing Options
    o=
    A few people emailed me today, noting that my solution above, while
    simple, doesn't work and results in infinite recursion. I apologize
    for not testing my solution.
    Anyway, after thinking about it, I felt that the simple fix would be:
    Block[{RowReduce=System`RowRed uce[#1,Method->...,##2]&}, ...]

  • Simplify Exponential Output
    4^(0.5x) can be rewritten as 2^x (i.e., 2^[(2)(0.5)(x)]).
    How can I get Mathematica to output 4^0.5x as 2^x?
    E.g., my input is 4^(.5 x); how do I get output of 2^x?

  • Putting controls next to graphics in the Manipulate Display area
    Just a little bit of rambling on Manipulate:
    Currently when writing a Manipulate, the control variables (slides, buttons,
    etc...) go into one "area" on the Manipulate output "call it the control
    variables area", and all the plots and graphics go into another "area" (call
    it the output area).
    Sometimes, it would be better to position a specific control next to the

  • plotting many curves
    Hello Group,
    I know I should avoid For cycles in mathematica, but I am C person...
    how to do this without For
    (*--------initialization------ ------------*)
    n = 10^2;
    xoi = RandomReal[{-10, 10}, {n}];
    yoi = RandomReal[{-10, 10}, {n}];
    ri = RandomReal[{0, 10}, {n}];
    ------------------------------ -----

  • Re: superimposed plots using SHOW command

    Here are two ways to do what you want. First would be to take
    advantage of the fact ListLinePlot can accept several data sets
    at once to plot. That is
    ListLinePlot[ReadList/@FileNam es["*Parabola*.txt"], options...]
    will create a plot showing the data in each of the files. Here,
    I assume there is no file with extension .txt that includes the

  • Re: Trouble with coupled quadratic equations where the solutions are
    If you're willing to accept numeric solutions then try solving for the
    distances instead of the coordinates. If dd is the matrix of squared
    distances, and h = IdentityMatrix[n]-1/n, then -.5(h.dd.h) should have
    3 positive and n-3 approximate-zero eigenvalues. Sort the eigenvalues,
    drop the last 3, minimize the sum of the absolute values of the rest

  • Re: bad Mathieu functions
    Or, a trifle simpler:
    ce1[r_, q_, z_] := MathieuCPrime[MathieuCharacter isticA[r, q], q, z]
    Plot[I ce1[3, SetPrecision[qq, 123], I], {qq, 750, 1000},
    Frame -> True, Axes -> None]
    or simpler yet:
    Plot[I ce1[3, qq, I], {qq, 750, 1000}, Frame -> True, Axes -> None,
    WorkingPrecision -> 123]
    Note that this doesn't work at all, and it's much slower:

  • Re: locally changing Options
    Nice. That seems far simpler than the other solutions offered.
    Bobby

  • Re: bad Mathieu functions
    A fourth option is to set $MinPrecision. Help for it has the following
    examples:
    Block[{$MinPrecision = $MachinePrecision},
    N[Pi, 50] - 265099323460521503743/84383735 478118508040]
    4.066722320572635*10^-41
    Block[{$MinPrecision = 20, $MaxPrecision = 20},
    1 - Sqrt[1 - Exp[-10`20]]]
    0.000022700222531293910900

  • Re: Workbench 2.0, One Assessment
    Thanks for that very detailed exploration of the Workbench and the DC.
    [rant]
    I must say, I am not a fan of creating layers of hidden information by
    GUI - which is why I extracted the basic steps required to create DC
    documentation, just using Mathematica. These are available on my
    website. I think it is always a mistake to take API's and hide them

  • QuickFactorInteger
    Dear Mathematica Gurus
    Who know how write procedure which will be do brutal force stop
    FactorInteger after defined time (e.g. 30 second) but results finded up
    to 30 second should be listed
    Best wishes
    Artur
    Option Automatic need about 75 second to stop
    Timing[fax =
    FactorInteger[
    111111111111111111111111111111 111111111111111111111111111111 1111111\

  • Re: Simple question
    Any help in this regard.
    Regards,
    HMQ

  • Re: Trouble with coupled quadratic
    If you have 3n variables, I don't see why you'd think you're in 3-space.
    Bobby

  • Re: locally changing Options
    Hi David,
    But sometimes the general is the enemy of the useful. In most cases like
    I fully agree with you. In most cases using dynamic scoping is probably an
    overkill and will bring more trouble than it is worth. I just have a feeling
    that it has great potential when used thoughtfully in some well-defined

  • Exporting equations as high-quality graphics
    Hi,
    I have some equations that I would like to export as high quality
    vector graphics to include in a poster which I am making in InDesign.
    I am exporting them as EPS. I also tried comparing it with the eps
    export from latexit. The latexit seems to look a lot better, even
    when I mess with the EPS options in mathematica and put a high dpi and

  • Plot not working correctly
    Hello, I'm having a problem with plotting and I'm not sure what the
    cause of it is. What is going on???
    Here is what I'm doing:
    (*A simple system of ODEs*)
    dS[t_]:= -b/P*S[t]*Inf[t]
    dInf[t_]:=b/P*S[t]*Inf[t]-g*In f[t]
    dR[t_]:=g*Inf[t]
    (*A function to solve the system and return the value of R[100000]*)

  • Re: locally changing Options
    Hi Leonid,

    It is always nice to have someone good at computer science to steer us away
    from the shoals!

    But sometimes the general is the enemy of the useful. In most cases like
    this the user really would be doing all the RowReduce manipulations
    explicitly. The general solution is going to be much more abstract and

  • Pi day
    Hello, I am a high school math teacher and the following puzzle was
    posed by a few math teachers I am in contact with.
    Create a fraction whose numerator has the digits 1 - 9 (used once)
    and whose denominator has the digits 1 - 9 (used one) .
    Which fraction has a value closest to the value of pi?
    I've worked on some "brute force" checks and managed to check all

  • Re: gaps in plot of piecewise function
    Hi,
    yep, but
    Sin[x] == (I/2)/E^(I*x) - (I/2)*E^(I*x) // Simplify
    Manipulate[
    Plot[Piecewise[{{Sin[x], x < 1.334}}, (I/2)/E^(I*x) - (I/2)*
    E^(I*x)], {x, 0, 3}, MaxRecursion -> mr,
    MeshStyle -> {Red, PointSize[0.005]}, Mesh -> All, PlotPoints -> pp,
    ImageSize -> 500], {{pp, 5, "PlotPoints"}, 3, 30,

  • Re: Transition to Wolfram Workbench
    hmm, I did it once from the command line and it worked. Tried it just
    by clicking on the icon on the panel and now it seems to work. I
    changed nothing.
    Maybe I was just doing something stupid.
    Okay, I'll play with it more.
    Thanks,
    Chuck

  • Re: Trouble with coupled quadratic equations where the solutions are degenerate/symmetric
    Hello - sorry for the extremely belated reply. Daniel, your method
    worked, of course - thanks.
    What I ended up going with was a numerical solver that makes initial
    guesses (with some randomnness) as to the values of the {x, y, z}, and
    then uses Newton iterations to try and solve them. If it doesn't work

  • Re: elementary questio about packages
    This is a not uncommon situation where the package routine does not behave
    as the notebook routine.
    The best solution may be to supply the desired symbol names to the package
    routine.
    MyOptimize[parms, {z1,z2,z3}]
    We assume that these appear in the parms expressions. This first method is
    more general and also picks up the Context of the notebook calling the

  • Re: Transition to Wolfram Workbench
    Hi,
    if I choose "Basic Project" I have to click "Next".
    When exactly freezes the WB? When you click on the "Basic Project" icon
    or when you click next?
    Have you tried to start the WB from the commandline to see
    whether there's an exception when you click?
    Cheers
    Patrick

  • Re: elementary questio about packages
    Hi,
    two solutions:
    1)quick=C2=B4n dirty: In your package code, replace "z1" with "Global`z1"
    etc. in situ. Quite prone to errors, oversights etc.
    2) make your private variable known to the global context by adding a
    usage comment before entering the private context, e.g.
    z1::usage="z1 is used for blabla..."

  • Re: locally changing Options
    An interesting question. I don't know of a good way to use Block on an
    Option value. Maybe someone will come up with a solution.
    I assume that within foo you are using RowReduce a number of times so you
    don't want to write the specific option value each time. Why not define your
    own local version of RowReduce for the foo routine?

  • Re: elementary questio about packages
    Am 11.03.2010 12:37, schrieb Francisco Gutierrez:
    It's impossible to say with the information you gave. My guess is that
    your function does not require the variables z1,z2,z3 as input or does
    not handle these correctly internally. If your function does not require
    the variable names you should not return some symbols that you created

  • Re: bad Mathieu functions
    Am 11.03.2010 12:35, schrieb becko BECKO:
    ...
    Oh yes, these oscillations are really tiny as you can see with
    Mathematica using:
    Plot[I ce1[3,q,I] /. q->SetPrecision[qq,123], {qq, 750, 1000},
    Frame->True, Axes->None]

  • Re: bad Mathieu functions
    The problem is that for large q ce1 will return incorrect values for
    machine numbers. On the other hand, for extended precision numbers it
    will return correct values. Compare:
    Machine number input:
    In[16]:= ce1[3, 1000., I]
    Out[16]= 0. - 2200.76 I
    Extended precision number input:
    In[17]:= ce1[3, 1000`50, I]

  • Re: Forcing mathematica to output a certain form
    Hi Geico,
    here is a rule that puts all terms containing y to the left and those
    not containing y to the right of the equal sign:
    t1 = f[t] == h[t] y[t]^2 - g[t] y'[t];
    t1 //. {
    Equal[x0___, x1___ + Longest[x2_ /; ! FreeQ[x2, y]] + x3___] :>
    Equal[-x2 + x0, x1 + x3],
    Equal[x1___ + Longest[x2_ /; FreeQ[x2, y]] + x3___, x0___] :>

  • Re: Struggling with FindFit for a model which takes results from
    Good day,
    I tried and fix a few things :
    (I truncated data to 10 minutes)
    In[1]:= Lp := 2.64*^-27;(*mol^2/(min atm um^5)*)
    Rad = 63;(*um*)A = 4 \[Pi] Rad^2;(*um^2*)
    R = 0.08206;(*L atm/(mol K)*)
    T = 286;
    minutes = 10;
    Vb = 0.19;
    Vbv = 4/3 \[Pi] Rad^3*Vb (*um^3*);
    volconv = 1*^15 (*converts um^3 to L;1x10^15 um^3 per L*);

  • keyboard short cut for equal symbol aligned math cell
    Is there a keyboard shortcut to add an equal symbol aligned math cell
    (or a marker aligned or centered math cell) to a notebook. I can only
    find it in the writing assistant pallette
    I couldn't find anything relevant in teh documentation center
    thanks for the help
    Chris

  • Re: gaps in plot of piecewise function
    Hi again,
    I hope everyone saw now that Exclusions->None or using not Piecewise but
    e.g. Which will do the trick. In the documentation it sounds to me that
    many functions are generally connected to Piecewise (look at Properties
    and Relations in the Piecewise doc).
    My question is, why would it be wrong to connect the plot in Piecewise

  • log axis in ListPointPlot3D
    Hi,
    I have frequency,voltage, and epsilon data as three columns.
    I need to plot this in 3d plot so that frequency in log scale.
    looking forward...
    Thanks..

  • windows 64 vs 32 bit
    I am not sure if this is the right place to ask this, but I can't think of any better. Would I gain some performance with Mathematica if I installed 64bit windows 7? I have a quad-processor, but only 2 gb ram, so I am not sure. Thanks.

  • Re: plot solution derivative
    date = {{39814.`, 876.34`}, {39817.`, 859.91`},
    {39818.`, 864.55`}, {39819.`, 840.95`},
    {39820.`, 853.95`}, {39821.`, 856.52`},
    {39824.`, 823.25`}, {39825.`, 821.24`},
    {39826.`, 810.06`}, {39827.`, 812.87`},
    {39828.`, 839.28`}, {39831.`, 836.`},
    {39832.`, 852.53`}, {39833.`, 852.08`},

  • Re: locally changing Options
    f
    Block[
    {RowReduce = RowReduce[#1, Method -> "OneStepRowReduction", ##2] &},
    (* your code here *)
    ]

  • Re: bad Mathieu functions
    Au contraire, Mathematica is one of the few systems that does support
    arbitrary precision evaluation of all special for arbitrary values of
    parameters. However, there is no getting around the fact that some
    regions of parameter space are just hard to compute!
    In the case of Mathieu functions, the series expansion by which they

  • Re: Setting default zoom factor in notebooks
    Thak you a lot !
    I didn't konw the Option Inspector, great !
    bye
    nicola