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: Expressing values in the legend in terms of original data
    Er,
    In my version of Mathematica (6.03 WinXP) the ContourPlot is in color
    by default. It doesn't make sense to add a grayscale legend. So either
    you color the legend or you add a greyscale ColorFunction to the
    ContourPlot:
    contourPlotFun =
    ContourPlot[
    2 Sin[x y], {x, -\[Pi]/2, \[Pi]/2}, {y, -\[Pi]/2, \[Pi]/2},

  • Re: could not get Simplified form
    Obaid,
    Could you provide us with a copy of your input? It is quite possible
    that you made a typo there.
    Cheers,
    Sjoerd
    On Oct 3, 12:41 pm, "Obaid Rehman"
    wrote:

  • Re: NDSolve and error
    x])/(x^p +
    1, 4}]
    John,
    I think your error results from the fact that you have defined y as
    both a function of x and as a function of t (y[t] and y[x]). I am not
    certain if you meant for y to be a function of both (in which case you
    need to specify it as such (y[x,t]) throughout the equation (and
    specify which derivatives you are taking) or if the y[t] on the left

  • Using an locator and Rotating 3D graphics
    When I try to use locators as inputs to 3D graphics, I end up not
    being able to rotate 3d graphics. Clicking on the graphic moves the
    nearest locator rather than the graphic. Switching to a collection of
    2D sliders works in a pinch, but does not achieve the desired effect.
    Here is an example:
    Manipulate[v = pt2 - pt1;

  • NET/Link Thread in C#
    Dear All-
    Can anyone give me a hint on how to start C# threads from
    Mathematica ?
    I tried:
    ====
    Needs["NETLink`"]
    InstallNET[];
    LoadNETType["System.Threading. Thread"]
    myThread = NETNew[ThreadStart]
    and I got:
    =======
    NETType["System.Threading.Thre ad", 8]
    NETNew::args: Improper count or type of arguments. >>

  • Re: Comparison between Mathematica and other
    But this need not have been done this way. It could have been done:
    Ordering@(Re/@{##}) || Equal@@(Re/@{##}) && Ordering@(Im/@{##})&
    From the perspective of someone not familiar with Mathematica
    and its notation, this version is undoubtedly more opaque. But
    for me, this is much clearer and easier to read. The issue of

  • Re: Comparison between Mathematica and other symbolic systems
    The current version of Mathematica has more than 2900 built-in
    symbols, with many of these having long lists of options. I
    would expect any other system with capabilities equivalent to
    Mathematica to have a similarly long list of built-in commands
    and options. This number of commands and options is far too long

  • Re: Finding the optimum by repeteadly zooming on the solution space (or something like that)
    On 10/5/08 at 6:05 AM, cuak2...@gmail.com (Mauricio Esteban Cuak)
    wrote:
    1,
    I don't understand why you would take this approach. Why not use
    the built-in function NMaximize, That is:
    In[20]:= NMaximize[{obj,
    cpoAg1 == 0 && cpoAg2 == 0 && x > 0.1 && y > 0.1}, {a, x, y}]
    Out[20]= {2084.72,{a->0.527688,x->22.67 27,y->13.7173}}

  • Re: Comparison between Mathematica and other
    In article , "peter lindsay"
    wrote:
    Not certain what earlier words Peter is agreeing with, but I agree with
    what Peter himself said -- perhaps edited to say:
    "The [primary objectives should be] to persuade people how accessible
    Mathematica [can be], not how incredibly learned and expert [its]

  • Re: Expressing values in the legend in terms of original data
    In addition to my previous reply I should have taken the automatic
    ranging of ContourPlot into account as it scales values to give a 0..1
    range.
    So, if you want to make sure the legend maps GrayLevels 0..1 to the
    -2..2 range (in case the ends of this range are not within the plot
    region) you have to adjust the scaling of ContourPlot accordingly:

  • integration
    Dear Experts,
    I have been trying to simplify(integrate) the following function, but
    M6 seems to give a complex answer which i cann't understand.. please
    help.
    x[s_]=\!\(
    \*SubsuperscriptBox[\(\[Integr al]\), \(0\), \(s\)]\(Cos[
    \*FractionBox[\(r\ t\ \((\(-\[Kappa]0\) + \[Kappa]1 + r\ \[Kappa]1)\)
    + \((1 + r)\)\ S\ \((\[Kappa]0 - \[Kappa]1)\)\ \((\(-Log[S]\) + Log[S

  • Re: Comparison between Mathematica and other symbolic systems
    Albert,
    yes it is, but that's an edited version, necessary for the post to
    appear on this list. Still, I have to disagree with you, as only a
    minority of the users switch from system to another depending on their
    needs. Most of us probably master one or at most two systems. That's
    it.
    Paolo

  • Axis in two scales
    Hello everyone.
    I have a dataset in pairs (x,y) that I would like to plot. The main
    problem is that the data set has interesting parts in the beginning
    that I would like to view clearly.
    As an example, create the following table:
    t = Table[{x, If[x < .5, Sin[100*x], Sin[x]]}, {x, 0, 5, 0.001}];
    ListPlot[t]

  • Re: Comparison between Mathematica and other
    Still, I would avoid such a highly condensed bit of code and would
    probably first try something more like the following:
    complexGreater[z_, w_] :=
    (Re[z] > Re[w]) || (Re[z] == Re[w] && Im[z] > Im[w])
    evalGreater[edata1_, edata2_] :=
    complexGreater[First@edata1, First@edata2]
    esys = Eigensystem[RandomReal[{-1, 1}, {6, 6}]]

  • Re: Comparison between Mathematica and other symbolic
    And "remember how to use it between infrequent uses" is a good criterion
    to note when comparing the long-to-type Mathematica names of functions,
    on the one hand, and the terse but often cryptic names of functions in
    some other systems.
    AES wrote:

  • an interesting problem of supplying boundary condition for a PDE
    Hi All,
    Down is the equation system
    Jc = -\[Rho] Subscript[\[GothicCapitalD],
    k] (D[\[Omega][x, y, t], x] + D[\[Omega][x, y, t], y]) -
    Subscript[\[GothicCapitalD],
    k] (D[Log[T[x, y, t]], x] + D[Log[T[x, y, t]], y]);
    ContEq = D[u[x, y, t], x] + D[u[x, y, t], y] == 0;
    MomentumEq = \[Rho] (D[u[x, y, t]^2, x] + D[u[x, y, t]^2, y]) ==

  • Re: NDSolve and error
    You typed y[t] rather than y[x]
    Bob Hanlon
    =============
    Hello!
    Lately I wrote simple code in Mathematica
    sol[p_] :=
    NDSolve[{Sqrt[
    1 + (y'[t])^2] == (x^(p - 1) + (y[x])^(p - 1)*y'[x])/(x^p +
    y[x]^p)^(1 - 1/p), y[1] == 6}, y, {x, 1, 4}]
    but when I typed sol[2] the following kind of error was shown:

  • How do I recover GridLines when using Prolog?
    Hi All:
    Thanks for all of you suggestions for the gradient soluitons. Below I
    provide some simple code of an example plot I made.
    bg = Polygon[{ImageScaled[{0, 0}], ImageScaled[{1, 0}],
    ImageScaled[{1, 1}], ImageScaled[{0, 1}]},
    VertexColors -> {Black, Black, ColorData["Legacy"]["MidnightB lue"],

  • Re: NDSolve and error
    =================^^^^^^
    Must be y'[x] not of t.
    In[1]:= sol[p_] :=
    NDSolve[{Sqrt[
    1 + (y'[x])^2] == (x^(p - 1) + (y[x])^(p - 1)*y'[x])/(x^p +
    y[x]^p)^(1 - 1/p), y[1] == 6}, y, {x, 1, 4}]
    In[2]:= sol[2]
    Out[2]= {{y->InterpolatingFunction[{{1 .,4.}},<>]}}
    In[3]:= Plot[y[x] /. %, {x, 1, 4}]

  • Re: Comparison between Mathematica and other symbolic systems
    In article ,
    No mention at all of "how easy it is to learn to use the system" (and
    remember how to use it between infrequent uses) ?!?!?!?

  • Re: NDSolve and error
    doda...@poczta.fm schrieb:
    Hi John,
    try to replace y'[t] in the call to Sqrt by y'[x], and you'll get an exact
    solution for p=2:
    In[3]:= DSolve[{Sqrt[Derivative[1][y][ x]^2 + 1] ==
    (x^(p - 1) + y[x]^(p - 1)*Derivative[1][y][
    x])/(x^p + y[x]^p)^(1 - 1/p),
    y[1] == 6} /. p -> 2, y, x]
    Out[3]= {{y -> Function[{x}, 6*x]}}

  • Re: Comparison between Mathematica and other
    I'm really not attempting to re-open the functional vs procedural
    programming battle here, but I'd offer a couple or three observations on
    the above:
    1) Commands like Sort[ ], Transpose[ ], Re[ ] are evidently "functions"
    and I suppose these functions contain massive levels of sophisticated
    functional programming (and pattern matching) in their internals -- --

  • Re: fellow authors
    Thanks David
    What I was trying to say, is that the only way that I know, is to make
    each chapter into a note book document. Then some how combine the
    notebooks into a book. But from what I read with Author tools, this way
    presents problems such as references (and I have many of them), hyper
    links, table of contents and index. The Author tools sounds like it

  • Re: mathlink unsigned types and bit sizes
    Hi,
    1) Mathematica does not know an unsigned type and you have to send int.
    2) MLGetReal64Array() are 64 bit reals, i.e. double ??
    3) it is up to you when you disown the data. A function that
    is called via the template mechanism never disown the array
    itself.
    Regards
    Jens
    Art wrote:

  • Re: NDSolve and error
    Look at the left hand side of differential equation you posted.
    It says something about the derivative evaluated at t. But the
    right hand side is evaluated at x. Change the t on the left hand
    side to x and things should work.

  • Re: NDSolve and error
    I think u typed wrongly the equation.
    I corrected it like this
    sol[p_] :=
    NDSolve[{Sqrt[
    1 + (y'[t])^2] == (t^(p - 1) + (y[t])^(p - 1)*y'[t])/(t^p +
    y[t]^p)^(1 - 1/p), y[1] == 6}, y, {t, 1, 4}]
    Then
    ol = sol[2];
    Plot[y[t] /. ol, {t, 1, 4}]

  • Finding the optimum by repeteadly zooming on the solution space (or something like that)
    Hello everyone.I know somebody has probably writ mathematica code on this
    problem.
    A general answer would probably benefit more people, but I'll do the
    specific example, 'cause I'm not sure how to explain it in another way.
    I have these restrictions:
    cpoAg1= ( -x + (70*a*(x^0.4 + y^0.4)^0.75)/x^0.6);

  • Re: could not get Simplified form
    >
    You should post the expression and the replacement rules you used
    (before evaluation), preferably in *InputForm* [1].
    Regards,
    - Jean-Marc
    [1] Select the cell(s) you want to include in your email, then within
    the *Cell* menu select either *Convert To* or *Display As* and choose
    *InputForm*. Finally, copy and paste as usual.

  • Re: could not get Simplified form
    On 10/3/08 at 6:42 AM, Obaid.Reh...@student.adfa.edu. au (Obaid
    This is a non-sense result and is a sure sign there is a problem
    in the code you used to get this result.
    In order for anyone to do this you will need to post the code
    that produced the results you posted above. From what you have
    posted, I expect the source of the problem is likely to be the

  • Comparison between Mathematica and other
    I agree. The object is to persuade people how accessible Mathematica is, not
    how incredibly learned and expert the users need to be.
    Peter
    2008/10/3 Murray Eisenberg

  • Re: Plotting ListDensityPlot with Custom Color Scheme
    Hi All,
    There is an update to the package that Szabolcs mentioned - you can
    find it here:
    [link]

  • Re: How do I create my own color gradient?
    Thanks for the tips everyone! Looks like I have a full weekend ahead
    playing with ColorFunctions and Blend....
    Cheers,
    t.
    PS - I never thought to try FullForm on ColorData...nice trick :)

  • NDSolve and error
    Hello!
    Lately I wrote simple code in Mathematica
    sol[p_] :=
    NDSolve[{Sqrt[
    1 + (y'[t])^2] == (x^(p - 1) + (y[x])^(p - 1)*y'[x])/(x^p +
    y[x]^p)^(1 - 1/p), y[1] == 6}, y, {x, 1, 4}]
    but when I typed sol[2] the following kind of error was shown:
    NDSolve::"ndnum": "Encountered non-numerical value for a derivative at

  • mathlink unsigned types and bit sizes
    I have some related mathlink questions that I haven't found answers
    for in the documentation. Answers to any would be great, thanks. Sorry
    for posting several questions at once:
    1. What is the best way to Put unsigned types. In particular, I have a
    large 64-bit unsigned multidimensional array? I can't use

  • Re: Comparison between Mathematica and other symbolic systems
    Which really says 2) is the most important consideration. But I
    would expand 2) to be the amount of time to input the problem
    *and* verify the input has been done correctly. In my
    experience, the time to verify/debug input is by far where most
    of the effort is spent.

  • Re: could not get Simplified form
    Hi,
    I'm sure that you are doing something wrong, but since you don't provide
    the code that produces these result it's unfortunatly impossible to help...
    albert
    PS: Do you really think you want to make all these personal details
    (which I have deleted) public available? Although I'm neither a lawyer
    nor an English native speaker, I doubt your disclaimer makes any sense

  • Re: Plotting ListDensityPlot with Custom Color Scheme
    Hi All,
    There is an update to the package that Szabolcs mentioned - you can
    find it here:
    [link]

  • mathlink unsigned types and bit sizes
    I have some related mathlink questions that I haven't found answers
    for in the documentation. Answers to any would be great, thanks. Sorry
    for posting several questions at once:
    1. What is the best way to Put unsigned types. In particular, I have a
    large 64-bit unsigned multidimensional array? I can't use

  • Re: Comparison between Mathematica and other symbolic systems
    Which really says 2) is the most important consideration. But I
    would expand 2) to be the amount of time to input the problem
    *and* verify the input has been done correctly. In my
    experience, the time to verify/debug input is by far where most
    of the effort is spent.

  • Re: could not get Simplified form
    On 10/3/08 at 6:42 AM, Obaid.Reh...@student.adfa.edu. au (Obaid
    This is a non-sense result and is a sure sign there is a problem
    in the code you used to get this result.
    In order for anyone to do this you will need to post the code
    that produced the results you posted above. From what you have
    posted, I expect the source of the problem is likely to be the

  • Re: could not get Simplified form
    Hi,
    I'm sure that you are doing something wrong, but since you don't provide
    the code that produces these result it's unfortunatly impossible to help...
    albert
    PS: Do you really think you want to make all these personal details
    (which I have deleted) public available? Although I'm neither a lawyer
    nor an English native speaker, I doubt your disclaimer makes any sense

  • Comparison between Mathematica and other
    I agree. The object is to persuade people how accessible Mathematica is, not
    how incredibly learned and expert the users need to be.
    Peter
    2008/10/3 Murray Eisenberg

  • Re: could not get Simplified form
    >
    You should post the expression and the replacement rules you used
    (before evaluation), preferably in *InputForm* [1].
    Regards,
    - Jean-Marc
    [1] Select the cell(s) you want to include in your email, then within
    the *Cell* menu select either *Convert To* or *Display As* and choose
    *InputForm*. Finally, copy and paste as usual.

  • NDSolve and error
    Hello!
    Lately I wrote simple code in Mathematica
    sol[p_] :=
    NDSolve[{Sqrt[
    1 + (y'[t])^2] == (x^(p - 1) + (y[x])^(p - 1)*y'[x])/(x^p +
    y[x]^p)^(1 - 1/p), y[1] == 6}, y, {x, 1, 4}]
    but when I typed sol[2] the following kind of error was shown:
    NDSolve::"ndnum": "Encountered non-numerical value for a derivative at

  • Re: How do I create my own color gradient?
    Thanks for the tips everyone! Looks like I have a full weekend ahead
    playing with ColorFunctions and Blend....
    Cheers,
    t.
    PS - I never thought to try FullForm on ColorData...nice trick :)

  • Re: Plotting ListDensityPlot with Custom Color Scheme
    Hi All,
    There is an update to the package that Szabolcs mentioned - you can
    find it here:
    [link]

  • Re: could not get Simplified form
    On 10/3/08 at 6:42 AM, Obaid.Reh...@student.adfa.edu. au (Obaid
    This is a non-sense result and is a sure sign there is a problem
    in the code you used to get this result.
    In order for anyone to do this you will need to post the code
    that produced the results you posted above. From what you have
    posted, I expect the source of the problem is likely to be the

  • Re: could not get Simplified form
    >
    You should post the expression and the replacement rules you used
    (before evaluation), preferably in *InputForm* [1].
    Regards,
    - Jean-Marc
    [1] Select the cell(s) you want to include in your email, then within
    the *Cell* menu select either *Convert To* or *Display As* and choose
    *InputForm*. Finally, copy and paste as usual.

  • Re: could not get Simplified form
    Hi,
    I'm sure that you are doing something wrong, but since you don't provide
    the code that produces these result it's unfortunatly impossible to help...
    albert
    PS: Do you really think you want to make all these personal details
    (which I have deleted) public available? Although I'm neither a lawyer
    nor an English native speaker, I doubt your disclaimer makes any sense

  • Re: Comparison between Mathematica and other
    I agree. The object is to persuade people how accessible Mathematica is, not
    how incredibly learned and expert the users need to be.
    Peter
    2008/10/3 Murray Eisenberg