Undo and Plot3D
- To: mathgroup at smc.vnet.net
- Subject: [mg47683] Undo and Plot3D
- From: Feleki Zsolt <feleki at hbt.arch.ethz.ch>
- Date: Wed, 21 Apr 2004 05:23:37 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hallo Mathgroup! Here are two questions: 1. Is it possible to set somewhere the number of steps that can be undone (Edit/Undo) with Mathematica? 2. I have the following problem (see the inserted notebooks below): I define a function h is derived from another function calcuated by NDSolve. Then this function h can very well be plotted with Plot using either Compiled->False, or Evaluate or definined h as a function of the variable a by h[a_]:=.... The example in the notebook is for Compiled False. However when I want to include another variable x, and plot h/Sqrt[x] with Plot3D nothing seems to work. I have tried several combinations with Compiled ->False or h[a_,x_]:=... and Evaluate[] or Including Sqrt[x] in the integral but I didn't get the result. Does anyone no the answer? I use Mathematica version 4.2. Notebook 1 with Plot Notebook[{ Cell[BoxData[ \(\(\( (*\ Example\ with\ Plot\ *) \)\(\[IndentingNewLine]\)\(\ \[IndentingNewLine]\)\(\(Clear[f, z, a, h];\)\[IndentingNewLine] res = NDSolve[{\(f'''\)[z] + f[z]*\(f''\)[z] \[Equal] 0, f[0] == 0, \(f'\)[0] == 1, \(f''\)[0] \[Equal] \(-0.627554883\)}, {f}, {z, 0, 10^6}]\[IndentingNewLine] \(h = 1/\(\[Integral]\_0\%20\((Exp[\(-a\)*\(\[Integral]\_0\%t\((f[ z] /. res)\) \[DifferentialD]z\)])\) \ \[DifferentialD]t\);\)\[IndentingNewLine] Plot[h, {a, 0, 100}, PlotStyle \[Rule] {RGBColor[1, 0, 0]}, PlotRange \[Rule] All, Frame \[Rule] Automatic, Compiled \[Rule] False]\[IndentingNewLine]\[IndentingNewLine] \)\)\)], "Input"] }, FrontEndVersion->"4.2 for Microsoft Windows", ScreenRectangle->{{0, 1280}, {0, 951}}, WindowSize->{922, 740}, WindowMargins->{{Automatic, 158}, {-108, Automatic}} ] Notebook 2 with Plot3D Notebook[{ Cell[BoxData[{ \(\(Clear[f, z, a, h];\)\), "\[IndentingNewLine]", \(res = NDSolve[{\(f'''\)[z] + f[z]*\(f''\)[z] \[Equal] 0, f[0] == 0, \(f'\)[0] == 1, \(f''\)[0] \[Equal] \(-0.627554883\)}, {f}, {z, 0, 10^6}]\), "\[IndentingNewLine]", \(\(h = 1/\(\[Integral]\_0\%20\((Exp[\(-a\)*\(\[Integral]\_0\%t\((f[ z] /. res)\) \[DifferentialD]z\)])\) \ \[DifferentialD]t\);\)\), "\[IndentingNewLine]", \(Plot3D[h/Sqrt[x], {a, 0, 100}, {x, 0.1, 1}, Compiled \[Rule] False]\)}], "Input"] }, FrontEndVersion->"4.2 for Microsoft Windows", ScreenRectangle->{{0, 1280}, {0, 951}}, WindowSize->{922, 740}, WindowMargins->{{Automatic, 65}, {Automatic, 47}} ] Best regards, Zsolt Feleki Doktorand Prof. Dr. Bruno Keller Hochbautechnik/ Professur f=FCr Bauphysik ETH H=F6nggerberg HIF C23.2, 8093 Z=FCrich Tel: 01-633 26 70 Fax: 01-633 10 41 http://www.bph.hbt.arch.ethz.ch