Suche | Bestellformular | Online-Shop

Home

Firma

Tipps, Tricks und Probleme (FAQ)

Auf dieser Seite sollen Tips, Tricks und Probleme, die von allgemeinem Interesse sein könnten, gesammelt werden.

Version 7 Linux

Patch existiert für Alt-Gr Problem (Klammern werden automatisch mit Sonderzeichen vorbesetzt). Bitte melden !

Version 6

Mathematica Documentation Center und Add-ons

"wüste RenderBadPicture" Meldungen unter Linux

Version 5

  • FindRoot : In Version 4 ging es, jetzt nicht mehr ?
    (Beitrag von Jens Kuska)
  • FindMinimum : In Version 4 ging es, jetzt nicht mehr ?
    (Beitrag von Jens Kuska)

Weitere Hilfs- und Infoquellen:

Version 4

  • Version 3
  • "Da hatte ich mir also meine nicht-benutzte Home-Use-Lizenz auf die
    neue Mandriva - Linux - intallation auf einer Partition meines Laptops installiert: Und dann geht es nicht, d.h., es kommen lauter wüste

    X Error of failed request: RenderBadPicture (invalid Picture parameter)
    Major opcode of failed request: 155 (RENDER)
    Minor opcode of failed request: 7 (RenderFreePicture)
    Picture id in failed request: 0x4c006a1

    Meldungen.

    Doch nach ein bisschen Suchen in den Mathgroup postings wurde ich zu folgendem kleinen Skript inspiriert, das man z.B. in ~/bin unterbringen kann,
    und dann geht alles wie erwartet:

    #!/bin/bash

    # inspieriert durch

    http://forums.wolfram.com/mathgroup/archive/2007/Feb/msg00110.html
    export XLIB_SKIP_ARGB_VISUALS=1
    mathematica

    FindRoot[] - Änderung in Version 5:

    1. Die erste Änderung besteht darin , das sich die Intervallangabe für FindRoot[] geaendert hat.

    Statt

    FindRoot[f[x]==0, {x,{a,b}}]

    muss man in Version 5.0

    FindRoot[f[x]==0,{x,a,b}]

    schreiben.

    Anmerkung: Intervalle für eine Variable x werden ansonsten immer

    {x, Untergrenze,Obergrenze} (wie bei Plot[], Integrate[] ..)

    angegeben und nicht wie früher bei FindRoot[] als

    {x,{Untergrenze,Obergrenze}}

    FindRoot[] war die einzige Funktion, die diese Inkonsistenz mit den Mathematica-Konventionen aufwies.

    2. In Version 5.0 liefert zum Beispiel

    g[x_]:=NIntegrate[Cos[l*x],{l,0,Pi}]

    Off[NIntegrate::ploss]

    FindRoot[g[x]==0,{x,0.5,1.5}]

    eine Fehlermeldung von NIntegrate[], dass der Integrand nicht numerisch ist.

    Dieses Problem tritt nur beim Verschachteln von numerischen Aufrufen auf, weil FindRoot[] sein Argument auswertet.

    Verhindern lässt sich dies mit einer einschränkenden Definition von g

    g[x_?NumericQ]:=NIntegrate[Cos[l*x],{l,0,Pi}]

    verhindern kann.

    Also sollte man vorsichtshalber immer den Numeriktest einbauen.

    Noch ein Tipp dazu:

    Wer ganz viele alte Pakete mit FindRoot[] hat, kann auch

    Unprotect[FindRoot]

    FindRoot[f_,{x_Symbol,l_List}]:=
    FindRoot[f,Evaluate[{x,Sequence @@ l}]

    Protect[FindRoot]

    benutzen (also die von Wolfram gelieferte Definition von FindRoot etwas ändern). Allerdings gibt es dann das (undokumentierte) Feature von FindRoot[] mehrere Nullstellen mit verschiedenen Startwerten , z.B. mit

    FindRoot[Sin[x]==0,{x,{3,6,9,12}]

    nicht mehr


    Für FindMinimum gibt es in Version 5 dasselbe Phänomen wie für FindRoot (siehe): auch FindMinimum wertet sein Argument aus. Daher sollte man bei verschachtelten numerischen Aufrufen mit einem Numeriktest sicherstellen, dass Zahlen produziert werden.


    Mathematica4 Student SUSeLinux

    The following information is also available from the Technical Support section of Wolframs website at the following URL:

    http://support.wolfram.com/Systems/Unix/Linux/DeleteNext.html

    Some users of the SuSE Linux distribution have indicated that the following stderr dialog box may occur while starting Mathematica4:

    Warning: Actions not found: delete-next-character

    This may occur multiple times.

    Our developers are currently tracking this problem. The cause appears to be a resource setting in the following file, similar to the .Xdefaults file, but it applicable to all users on the system:

    /usr/X11R6/lib/X11/Xresources

    The problematic lines look like this:

    *XmText.Translations: #override \n\
    ~Shift ~Meta ~Alt Delete: delete-next-character() \n

    You can check to see if this is the problem by starting the Mathematica front end and running the following command in a shell running on the same machine as the X server:

    appres XMathematica > /tmp/XMathematica.res

    Check the results of this for resources that map delete-next-character() to a particular event. There may be several instances of this.

    The workaround is to add a resource setting that counteracts this resource for Mathematica. It may be a set on a per-user basis in $HOME/.Xdefault or globally in Xresources. Here is the setting:

    [cut here]

    !==================================================================
    ! XMathematica
    !==================================================================
    XMathematica*XmText.translations:

    [cut here]

    This protects Mathematica from the offending resource and at the same time keeps the resource setting available to other Motif-based applications that do understand the resource setting.

    Some users have reported that you may need to use XMathematica*Text.translations:
    in place of XMathematica*XmText.translations:

    This workaround should be tested by first running xrdb and then launching the front end. The warning messages should no longer appear.


    Entfernung der schwarzen Gitterlinien auf der Kugeloberfläche

    Mit Edegeform[]

    << Graphics`Shapes`
    Show[Graphics3D[{EdgeForm[], Sphere[ ]}], Boxed -> False]

    top


    Einlesen von Daten mit ReadList

    Question

    The task of reading data produced by other software into Mathematica is no too easy for some user.

    Let me explain: I do have a customer (who uses an NT version of Mathematica),who tries to read in data produced by Euclid with ReadList. the data set basically consists of a data matrix with three columns. some rows do have variable names; eg like that:

    x1 x2 x3
    1.2 2.3 4.3
    2.4 4.6 7.8
    ....
    x1 x2 x3
    3.4 .....
    .....

    I tried to do it with ReadList[file, Number] with my Mac-Version. That did not work because of the variable names.

    After deleting the names, it still did not work. I went into a data editor and loaded the file and saved it again. Now it worked.

    I found out that somehow Euclid has included something else between the rows and merely by resaving it, this something was erased.

    Convinced that this was the solution I communicated this to the customer. He tried it (with Mathematica 3.0 NT) but still it does not work.

    ANSWER:

    This has to do with ReadList[]. If you use ReadList[file, Number], Mathematica expects every value to be a number. Here is one way to read the file. First, here is my test file.

    x1 x2 x3
    1 2 3
    4 5 7
    x1 x2 x3
    2 3 4
    5 6 7
    8 9 0

    I can read the entire list into Mathematica if I read each item as a Word.

    top



    Probleme mit Fonts unter Unix und X

    Question 1:

    How do I make Mathematica 3.0 find the fonts for the front end?

    Answer 1:

    The key to getting the Mathematica front end to run correctly on X is to make sure that your X server can find the Mathematica fonts.

    Most users on terminals or PCs running emulation software will be displaying applications that are running on other machines back to their terminal. This does not mean that the X server is running on the same machine on which the application is.

    Instead, the X server is being run on a different machine, and the application of interest is simply being piped to the X server on the different machine, which, in turn, is sending the display to the terminal.

    When starting Mathematica, the shell scripts math and mathematica attempt to set the font path on the machine on which it is being run, not necessarily on the machine on which the X server is being run.

    Therefore, when the X server tries to access the fonts, it cannot find them.

    Given this, it will be necessary for you to run the xset commands manually on the machine on which the X server is running, provided that the Mathematica directory is visible to the machine that is running the X server, prior to starting the Mathematica.

    xset fp+ /path to Mathematica directory/SystemFiles/Fonts/Type1
    xset fp+ /path to Mathematica directory/SystemFiles/Fonts/X
    xset fp rehash

    The X server should be able to find the fonts and display them to the terminal now, provided that the X server understands the format in which our fonts were created, which are Type1 and BDF.

    At this point, you can log into the machine that you wish to run the Mathematica front end and set the DISPLAY variable to the machine that the X server is running on, and then start Mathematica.

    If your X server complains about not finding the fonts, then you should check your documentation on your X server software to find out what types of font formats it understands. The odds are that it will understand PCF fonts. You can get a set of these fonts via anonymous ftp to MathSource.

    These fonts are available as a compressed tar archive for UNIX systems or a zip archive for PC's running X emulation software.

    ftp://mathsource.wolfram.com/pub/outgoing/Support/Math30PCFFonts.tar.Z
    ftp://mathsource.wolfram.com/pub/outgoing/Support/Math30PCFFonts.zip

    You will need to uncompress and unarchive these files and then place them in a directory that is visible on your font path on your X server. By doing this, you will not have to modify your font path. To find out what your current font path is, enter at a Unix prompt xset -q.

    If you are on a SunOS 4.1.3 or earlier machine and you are running OpenWindows, then you will need to get a different set of font files.

    ftp://mathsource.wolfram.com/pub/outgoing/Support/sun_news_fonts.tar.Z

    After downloading, uncompressing, and untarring the file, you will need to add the directory in which the fonts reside (News) to Mathematica's font path. This can be done be editing the math and mathematica scripts in /usr/local/bin and changing the font variable so that it points to the News directory. This should be the only directory added to your font path if using the News fonts. Be sure to remove the paths to the Type1 and X fonts if you have added them. Mathematica will still complain that it is unable to find these fonts, but it does not need them so these warnings can be ignored. Mathematica should work without any problems after saving these changes.

    top


    Question 2:

    Was man als Benutzer einer deutschen Tastatur machen kann, wenn Klammern etc. nicht korrekt erzeugt werden?

    Answer 2:

    Von Wolfram kann man sich eine Palette laden, mit der die Klammern dann per Mausklick in das jeweilige Dokument eingefügt werden können. Diese Palette kann jedoch auch noch modifiziert werden (Ratschlag des Tech Supports in GB):

    Dazu wählen Sie die Anweisung "Generate Notebook from Palette" im File-Menü, heben Sie die Zell-Formatierung ("Show Expression" aus dem Menü Format ) auf und editieren Sie den Ausdruck. Zum Beispiel so

    Cell[BoxData[GridBox[{
    {
    ButtonBox["["],
    ButtonBox["]"]},
    {
    ButtonBox["{"],
    ButtonBox["}"]},
    {
    ButtonBox["("],
    ButtonBox[")"]},
    {
    ButtonBox["`"],
    ButtonBox["~"]},
    {
    ButtonBox["|"],
    ButtonBox["\\"]}
    },
    RowSpacings->0,
    ColumnSpacings->0,
    GridDefaultElement:>ButtonBox[ "\\[Placeholder]"]]],
    NotebookDefault,
    CellMargins->{{Inherited, Inherited}, {5, Inherited}},
    Evaluatable->True,
    CellGroupingRules->"InputGrouping",
    CellHorizontalScrolling->True,
    PageBreakAbove->True,
    PageBreakWithin->False,
    GroupPageBreakWithin->False,
    CellLabelMargins->{{11, Inherited}, {Inherited, Inherited}},
    DefaultFormatType->DefaultInputFormatType,
    LineSpacing->{1.25, 0},
    AutoItalicWords->{},
    FormatType->InputForm,
    ScriptMinSize->9,
    ShowStringCharacters->True,
    NumberMarks->True,
    CounterIncrements->"Input",
    StyleMenuListing->None,
    FontFamily->"Courier",
    FontWeight->"Bold"]

    Anschließend wird die Operation wieder umgekehrt durch Formatierung der Zelle ("Show Expression" erneut wählen) und mit "Generate Palette from Expression" im File-Menü wird die Palette wiederhergestellt.

    Eine permanente Korrektur ist auch möglich, diese wird beschrieben auf der www-Seite:

    http://www.wolfram.com/support/Systems/Unix/FE/NoBrackets.html

    top


    Hinweis zur Installierung auf FileServer: Windows

    http://support.wolfram.com/networkmathematica/systems/windows/networkinstall.html

    top