mm-849 === Subject: Re: elasticity Of course the correct is... ...the unbounded and bounded media... ģ/.82 dimitris [NonBreakingSpace].8b.96.87æ.8c: > I have ordered a new book called Continuum Mechanics using Mathematica see here http://www.amazon.com/Continuum-Mechanics-using-Mathematica-Fundamentals/dp/0 817632409/sr=8-2/qid=1166756429/ref=sr_1_2/104-4481998-2595958?ie=UTF8&s=book s Does anyone know related applocations of Mathematica in the field of > the Mathematical Theory of Elasticity (and its brances such us > elastostatics, elastodynamics, fracture mechanics etc.) In particular I am interested in the simulation of propagation of > elastic waves in unbounded and unbounded media (longitudinal, > transverse, Rayleigh, Stoneley, torsional waves and so on). > > > Dimitris === Subject: Re: terminate the NestWhile Arek The help documentation gives us the following information ... NestWhile[f, expr, test, m, max] applies f at most max times. Mark NestWhile repeats calculations until test is no longer True. Sometimes > it happens that it takes a lot of time. How can I terminate > calculations if they last more than the certain amount of time or more > than certain number of iterations? > > Best, > > Arek === Subject: RE: Centering Text Cell Hi Bruce, Why not use the CellMargins option? Plot[x^2, {x, -3, 3}]; CellPrint[Cell[BoxData[ GridBox[{{Column I, Column II}, {Row1, Code1}, {Row2, Code2}}, ColumnAlignments -> {Right, Left}] ], Text, CellMargins -> {{130, Automatic}, {Inherited, Inherited}}]]; David Park djmp@earthlink.net http://home.earthlink.net/~djmp/ Re Mathematica 5.2 under WinXP. In the code below, output cell #2 is the caption of output cell #1. How would I center the caption under the graphic, if it can be done at all? Tech support has crafted a clever solution that uses scaled coordinates and Epilog to create a single output cell. However, I wonder if this centering can be done while keeping the two output cells intact. If so, then maintaining the caption becomes easier. Bruce Plot[x^2, {x, -3, 3}]; CellPrint[Cell[BoxData[ GridBox[{{Column I, Column II}, {Row1, Code1}, {Row2, Code2}}, ColumnAlignments -> {Right, Left}] ], Text]]; === Subject: Re: RootSearch Performance > About a week ago we had the thread: > FindRoot anomoly (example from Mathematica > -------------------------------------------------------------- Ersek's RootSearch function finds only seven roots to the equation > between x == 1 and x == 100: > (* Rules for seven roots, all between 1 and 20 were returned. *) --------------------------------- > Then Carl Woll (of Wolfram Research) replied: An alternative method is possible using IntervalBisection: > < snip > The nice thing about IntervalBisection is that we were able to use an > initial range of {0,Infinity} instead of {1,100}. The other nice thing > about IntervalBisection is that we are guaranteed that all roots lie in > the interval given in the result, something that is not true with > RootSearch. The price you pay is that the only transcendental functions allowed in > the input are trigonometric/exponential functions and their inverses, > i.e., only functions which support Interval arguments. for a root outside the range specified in the input. While > RootSearch has many lines of code, the ideas I use to limit the > range being searched are straight forward. I doubt you can find > an example where it returns a root outside the specified range. > However, if you can find an example that shows otherwise, > I would like to know about it. Ted Ersek > Reply to: Ted.Er...@navy.mil I think the problem here is a simple linguistic ambiguity. What Carl meant is that IntervalBisection returns a list of sub-intervals of the original interval that contain all the roots that lie in the original interval. In other words: no roots are ever missed, unlike the case with RootSearch that may sometimes miss some roots. This is quite different form saying that all rots that are found lie in the originally specified interval, which of course is true for RootSearch. Andrzej Kozlowski === Subject: Eigenvalues of the Laplacian on arbitrary plane domains I wonder if any of you is aware of Mathematica code to solve the eigenvalue problem Delta u=lambda u u[boundary]=0 on arbitrary (planar) domain. (Circle, rectangle is trivial.) Janos === Subject: Re: Bug or feature ? Evaluate this PlotPoints /. Options[PolarPlot] to find that the default number of points used to generate the plot is 25. You can fix your problem by overriding the default with a larger value. For instance: PolarPlot[Sin[t]^2 Cos[t]^2, {t, 0, 21},PlotPoints->100] Steve Luttrell West Malvern, UK > Please, try this with Mathematica (5.2): << Graphics`Graphics` PolarPlot[Sin[t]^2 Cos[t]^2, {t, 0, 2Pi}] PolarPlot[Sin[t]^2 Cos[t]^2, {t, 0, 21}] compare the two graphics. In the second (t is between zero and twentyone) > I got a spurios segment between 3rd and 4th quadrants. Can you tell me why ? (Btw, I got this just playing for one minute or two > with PolarPlot. The 21 was a typo...) g. > === Subject: Re: Tabling > Here is the program. I don't know how to post to the math group so > that you and I can see what we type or else i would send it there. I'm > communitysize = Range[10]; > generations = size^2; > community := (communitysize[[Random[Integer, {1, size}]]] = hubl[lyst]); > hubl[lyst_] := communitysize[[Random[Integer, {1, size}]]] ; > size := Length[communitysize]; > chance := Random[Integer, {1, 30}] == 1; > speciation := (communitysize[[Random[Integer, {1, size}]]] = > Random[Integer, {size + 1, size + 100}]) > changing := If[chance, speciation, community ]; > SpeciesCount[lyst_] := Length[Split[Sort[communitysize]]]; > randomwalks := Table[changing; {t,SpeciesCount[communitysize]}, {t, 1, > generations}]; > lyst = randomwalks; > averagespecies := N[Mean[Map[Last, lyst]]]; > Here's the line that i need to work and not return the same number. > Table[averagespecies, {generations}] I have ran your code and it appears that /generations/ does not contains what you expect it to contain. (See belowl) In[1]:= communitysize = Range[10]; generations = size^2; community := communitysize[[Random[Integer, {1, size}]]] = hubl[lyst]; hubl[lyst_] := communitysize[[Random[Integer, {1, size}]]]; size := Length[communitysize]; chance := Random[Integer, {1, 30}] == 1; speciation := communitysize[[Random[Integer, {1, size}]]] = Random[Integer, {size + 1, size + 100}] changing := If[chance, speciation, community]; SpeciesCount[lyst_] := Length[Split[Sort[communitysize]]]; randomwalks := Table[changing; {t, SpeciesCount[communitysize]}, {t, 1, generations}]; lyst = randomwalks; averagespecies := N[Mean[Last /@ lyst]]; In[13]:= Table[averagespecies, {generations}] Out[13]= {3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56, 3. 56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.5 6, 3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3 . 56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.5 6, 3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3 . 56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.56,3.5 6, 3.56,3.56,3.56,3.56,3.56,3.56,3.56} In[14]:= ?generations generations generations = size^2 Moreover, I have had some difficulties to understand the logic of your code (for instance, why a function such as hubl is defines as taking one parameter, parameter that is never used within the body of the function?) so I did not investigate further. Could you, please, comment/elaborate/explain what each expression is supposed to achieve? In[1]:= communitysize = Range[10] Out[1]= {1,2,3,4,5,6,7,8,9,10} In[2]:= generations = size^2 Out[2]= !(size^2) In[3]:= community := communitysize[[Random[Integer, {1, size}]]] = hubl[lyst]; In[4]:= ?community Global`community !(* InterpretationBox[GridBox[{ {GridBox[{ {(community := (communitysize.8b„ūRandom[ Integer, {1, size}].8b„[YAcute] = hubl[lyst]))} }, GridBaseline->{Baseline, {1, 1}}, ColumnWidths->0.999, ColumnAlignments->{Left}]} }, GridBaseline->{Baseline, {1, 1}}, ColumnAlignments->{Left}], Definition[ community], Editable->False]) In[5]:= community !(* RowBox[{(Random::randn), ((:)( )), RefGuideLinkText, ButtonFrame->None, ButtonData:>Random::randn])>}]) !(* RowBox[{(Set::pspec), ((:)( )), RefGuideLinkText, ButtonFrame->None, ButtonData:>General::pspec])>}]) Out[5]= hubl[lyst] In[6]:= hubl[lyst_] := communitysize[[Random[Integer, {1, size}]]]; In[7]:= ?hubl Global`hubl !(* InterpretationBox[GridBox[{ {GridBox[{ {(hubl[lyst_] := communitysize.8b„ūRandom[Integer, {1, size}].8b„[YAcute])} }, GridBaseline->{Baseline, {1, 1}}, ColumnWidths->0.999, ColumnAlignments->{Left}]} }, GridBaseline->{Baseline, {1, 1}}, ColumnAlignments->{Left}], Definition[ hubl], Editable->False]) In[8]:= size := Length[communitysize]; In[9]:= ?size Global`size !(* InterpretationBox[GridBox[{ {GridBox[{ {(size := Length[communitysize])} }, GridBaseline->{Baseline, {1, 1}}, ColumnWidths->0.999, ColumnAlignments->{Left}]} }, GridBaseline->{Baseline, {1, 1}}, ColumnAlignments->{Left}], Definition[ size], Editable->False]) In[10]:= chance := Random[Integer, {1, 30}] == 1; In[11]:= chance Out[11]= False In[12]:= speciation := communitysize[[Random[Integer, {1, size}]]] = Random[Integer, {size + 1, size + 100}] In[13]:= speciation Out[13]= 21 In[14]:= changing := If[chance, speciation, community]; In[15]:= changing Out[15]= 5 In[16]:= SpeciesCount[lyst_] := Length[Split[Sort[communitysize]]]; In[17]:= randomwalks := Table[changing; {t, SpeciesCount[communitysize]}, {t, 1, generations}]; In[18]:= lyst = randomwalks Out[18]= {{1,8},{2,7},{3,6},{4,5},{5,5},{6,5},{7,5},{8,5},{ 9,5},{10,5},{11,5},{12,5},{13,5},{14,5},{15,5},{ 16,4},{17,4},{18,4},{19,4},{20,4},{21,4},{22,4},{23,4},{24,4},{25,4},{26,4}, {27,4},{28,4},{29,3},{30,3},{31,3},{32,3},{33,3},{34,3},{35,3},{36,3},{37,3} ,{ 38,3},{39,3},{40,3},{41,3},{42,3},{43,3},{44,3},{45,3},{46,3},{47,3},{48,3}, { 49,3},{50,3},{51,3},{52,3},{53,3},{54,2},{55,2},{56,2},{57,2},{58,2},{59,2}, { 60,2},{61,2},{62,2},{63,2},{64,2},{65,2},{66,2},{67,2},{68,2},{69,2},{70,2}, { 71,2},{72,2},{73,2},{74,2},{75,2},{76,2},{77,2},{78,1},{79,1},{80,1},{81,1}, { 82,2},{83,2},{84,2},{85,2},{86,1},{87,1},{88,1},{89,1},{90,1},{91,2},{92,2}, { 93,2},{94,2},{95,2},{96,2},{97,2},{98,2},{99,2},{100,2}} In[19]:= averagespecies := N[Mean[Last /@ lyst]]; In[20]:= averagespecies Out[20]= 2.93 Jean-Marc === Subject: Re: Tabling > So I am having a problem running a Table[Table[,{}],{}]. It's just > giving the findings of the first table and printing it however many > times I tell the Second table. Any ideas how to get first table to > rerun so i can get different vaules in the second table. Could you please post an actual example of nested table expressions that does not yield what you expected? It difficult to help you more since the default behavior is that inner table expressions are always re-executed as you can see in the following examples: In[1]:= Table[Table[i + i, {j, 1, 3}], {i, 1, 5}] Out[1]= {{2,2,2},{4,4,4},{6,6,6},{8,8,8},{10,10,10}} In[2]:= Table[Table[Random[], {3}], {5}] Out[2]= {{0.695828,0.297336,0.293787},{0.808603, 0.86753,0.370029},{0.07408,0.61986,0.331115},{0.381885, 0.0654143,0.772265},{0.686679,0.732357,0.953552}} The above expression is indeed equivalent to this one In[3]:= Table[Random[], {5}, {3}] Out[3]= {{0.178237,0.625166,0.754389},{0.279229, 0.774446,0.29723},{0.508713,0.477397,0.695054},{0.601403, 0.211377,0.18361},{0.886451,0.733873,0.841348}} Jean-Marc === Subject: Re: Tabling Without seeing your original code it is difficult to troubleshoot this, but why do you have a comma before your first set of brace codes? Here is an example of a list within the table command that works for me ... is this what you had in mind? !(Table[{n, n^2, n^3, n^4}, {n, 1, 10}]) Steven Shippee slshippee@comcast.net > So I am having a problem running a Table[Table[,{}],{}]. It's just > giving the findings of the first table and printing it however many > times I tell the Second table. Any ideas how to get first table to > rerun so i can get different vaules in the second table. > === Looking for a method to convert a mathematica Graphics3D object into a Steve === 1. Read the help file entry for Export. 2. Read the MathGroup archives. 3. Pray. > Looking for a method to convert a mathematica Graphics3D object into a > Steve -- http://chris.chiasson.name/ === > Looking for a method to convert a mathematica Graphics3D object into a Have you look at the Export built-in function? It can convert an Graphics3D object into an AutoCAD drawing interchange format (.dxf) file. See http://documents.wolfram.com/mathematica/functions/Export Happy Holidays, Jean-Marc === Subject: Re: latex label in mathematica graphics directly from Mathematica: http://library.wolfram.com/infocenter/MathSource/6193/ take care, JS Can anyone please tell how can I use Latex labels in Mathematica > graphics. > > Purnendu === Subject: Re: Any simple way to flatten all but the bottom level? Norbert, I like your way best of all. Any ideas why Level[] allows for negative levelspecs while Flatten[] does not? The first thing I had thought of was to use Flatten[li,-1] meaning to flatten out everything but the last level. This does not compute, though. Sch.9ani Wiehnacht! Roman. > Hello The following will do what you want: li = {{0, 0, 0}, {{0, 0, 13}, {0, 1, 9}, {0, 2, 5}, {0, 3, 1}}, {{1, 0, > 4}, {1, 1, 0}}}; Level[ li, {-2}] Norbert Marxer www.mec.li > Am I overlooking something I should be able to see? > > When I Nest Table I sometimes produce things like this > > {{0, 0, 0}, {{0, 0, 13}, {0, 1, 9}, {0, 2, 5}, {0, 3, 1}}, {{1, 0, 4}, > {1, 1, 0}}} > > where each triple is actually one solution I'm looking for. > But I don't see a simple way to transform this result into > > {{0, 0, 0}, {0, 0, 13}, {0, 1, 9}, {0, 2, 5}, {0, 3, 1}, {1, 0, 4}, {1, > 1, 0}} > > I would have guessed there would be a way to coax Flatten to do this. > > Thus far I haven't found what looks like a good method. > I have found a few awkward and bad ways but no simple clean way. > > Would anyone enlighten me? > === Subject: Re: Any simple way to flatten all but the bottom level? generalising: it takes some care to operate on the lowest level where the head List occurs: without assurance that the element count will always be three, and without knowing that all elements will be atoms (but could also be h[0]), we can still use: li = {{0, 0, 0}, {{0, 0, 13}, {0, 1, 9}, {0, 2, 5},{0, 2, 5}, {0, 3, 1}}, {{1, 0, 4}, {1, 1, h[0]}}}; Flatten[li /. {expr__} :> (z[expr] /; FreeQ[z[expr], List])] /. z -> List where we explicitly check for List on the lowest level. dontdont@gmail has a point: Flatten could have been constructed working 'from bottom level up' just as well as the implemented 'from top level down'. But it doesn't. W. === Subject: Re: Generating systems of constraints > Good day! I was hoping someone might be able to point me in the > right direction with a problem I ran into. I'm trying to solve an > arbitrarily large system of linear, Diophantine equations whose > solutions are subject to two constraints > 1) All the variables are distinct; i.e., none of the variables are > equal to one another. > 2) All of the variables are bounded by 1 <= x <= # of variables. So in essence, I have a system of equations with N variables that I > would like to generate solutions for by assigning {1,2...,N} to each > variable. Now, I know that I can use Reduce to solve this system; however, I > don't know how to generate constraints like this for a given N, and > I'd rather not type them all out. Does anyone have any suggestions? > I don't need to do this for very many systems, but more than four, so > I don't want to have to do too much of it manually. > Gratefully, > a. I'm reading this as saying that you want {x[1],...,x[n]} to be a permutation of {1,...,n}. If so then how about Block[{v,x,otherstuff}, v = Array[x,n]; ... Union[v] == Range[n] ...]? === Subject: Re: Generating systems of constraints > Good day! I was hoping someone might be able to point me in the > right direction with a problem I ran into. I'm trying to solve an > arbitrarily large system of linear, Diophantine equations whose > solutions are subject to two constraints > 1) All the variables are distinct; i.e., none of the variables are > equal to one another. > 2) All of the variables are bounded by 1 <= x <= # of variables. So in essence, I have a system of equations with N variables that I > would like to generate solutions for by assigning {1,2...,N} to each > variable. Now, I know that I can use Reduce to solve this system; however, I > don't know how to generate constraints like this for a given N, and > I'd rather not type them all out. Does anyone have any suggestions? > I don't need to do this for very many systems, but more than four, so > I don't want to have to do too much of it manually. > Gratefully, > a. There may be various ways to do this. What I often do is create n^2 variables, using n for each original variable. Index them x[i,j] where {i,j} run from 1 to n, all take on values either 0 or 1, and x[i,j]=1 means the ith original variable is equal to j. The constraints then become Sum[x[i,j],{j,1,n}]==1 for each i, and Sum[x[i,j],{i,1,n}==1 for each j. These together with the constraint that each take on integer values (that is, either 0 or 1) means each original variable takes a distinct value in {1,...,n}. If you have more than 20-30 variables, chances are this will become intractable for the problem at hand. If that describes you problems then I'll need to give this more thought. Daniel Lichtblau Wolfram Research === Look in Help, Export: The following three-dimensional graphics formats are supported: DXF AutoCAD drawing interchange format (.dxf) STL STL stereolithography format (.stl) Have you tried that? Most CAD programs should be able to read DXF files. Ingolf Dahl > -----Original Message----- === > > Looking for a method to convert a mathematica Graphics3D > Steve > > === I encountered an equation, z^6*q^2-4*z^5*cosk*q^2+(2*cosk^2*q+2*q^2+3*cosk^2*q^2)*z^4+(-2*cosk*q^2-2*co sk^3*q-2*cosk*q-2*cosk)*z^3+(3*cosk^2+2+2*cosk^2*q)*z^2-4*cosk*z+1=0 where 0<=q<1 and -1< cosk <1 are parameters. I heard mathematica do very well on symbolic calculations. Can somebody === problem! If not, I will revert. Steve -----Original Message----- === unknown sender Look in Help, Export: The following three-dimensional graphics formats are supported: DXF AutoCAD drawing interchange format (.dxf) STL STL stereolithography format (.stl) Have you tried that? Most CAD programs should be able to read DXF files. Ingolf Dahl > -----Original Message----- === > > Looking for a method to convert a mathematica Graphics3D object into a > Steve > > === Subject: Looking for an option to stop right truncation of graphics in html creation When I File->Save As Special...->HTML it truncates graphics that extend beyond the right side of the screen. I've tried to dig through the documentation and search the web to find a way to have the graphics not be truncated, so that the web browser would scroll back and forth across the graphics in the same way that Mathematica can. === Subject: Re: GraphPlot display anomaly Everything works without a glitch here, but I only have: $Version Andrzej Kozlowski > Whenever I try to evaluate that statement, or the original posters > statement, or any GraphPlot statement that doesn't have a complete > cycle, my > Mathematica 5.2 crashes! For example, the following statement that deletes a number of edges > from the > example in Help crashes. Needs[DiscreteMath`GraphPlot`]; GraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 4 -> 5, 5 -> 6, 6 -> 7, 7 -> 8}, > EdgeStyleFunction -> (Arrow[{#1, #2}] &)]; crash! David Park > djmp@earthlink.net > http://home.earthlink.net/~djmp/ > The only problem is with your code. The correct way to do this is: > Needs[DiscreteMath`GraphPlot`]; > GraphPlot[{1 -> 2}, > ImageSize -> {50, 50}, > DisplayFunction -> (Display[$Display, #] &) > ]; Note the crucial parentheses missing from original code. > I think the answers to all your questions should now be self-evident. Andrzej Kozlowski > Tokyo, Japan === Subject: Re: GraphPlot display anomaly > Hi All, try the followings with Mathematica 5.2: > Needs[DiscreteMath`GraphPlot`]; GraphPlot[{1 -> 2}, > ImageSize -> {50, 50}, > DisplayFunction -> Evaluate[Display[$Display, #] &] > ]; > Q1. Why does it produce two output graphics? > Q2. Why does it not work without Evaluate[...]? > Q3. Why does it work with simply using DisplayFunction - $DisplayFunction? May it be that the implementation of option-passing was screwed up in > DiscreteMath`Graphplot? > Istvan Zachar The only problem is with your code. The correct way to do this is: Needs[DiscreteMath`GraphPlot`]; GraphPlot[{1 -> 2}, ImageSize -> {50, 50}, DisplayFunction -> (Display[$Display, #] &) ]; Note the crucial parentheses missing from original code. I think the answers to all your questions should now be self-evident. Andrzej Kozlowski Tokyo, Japan === Subject: Re: GraphPlot display anomaly What probably happens is that the package authors use a Block on $DisplayFunction to draw an intermediate plot without displaying it. Since your method won't allow a Block of $DisplayFunction, the intermediate graph is shown. > Hi All, try the followings with Mathematica 5.2: > Needs[DiscreteMath`GraphPlot`]; GraphPlot[{1 -> 2}, > ImageSize -> {50, 50}, > DisplayFunction -> Evaluate[Display[$Display, #] &] > ]; > Q1. Why does it produce two output graphics? > Q2. Why does it not work without Evaluate[...]? > Q3. Why does it work with simply using DisplayFunction - $DisplayFunction? May it be that the implementation of option-passing was screwed up in > DiscreteMath`Graphplot? > Istvan Zachar -- http://chris.chiasson.name/ === Subject: GraphPlot display anomaly Hi All, try the followings with Mathematica 5.2: Needs[DiscreteMath`GraphPlot`]; GraphPlot[{1 -> 2}, ImageSize -> {50, 50}, DisplayFunction -> Evaluate[Display[$Display, #] &] ]; Q1. Why does it produce two output graphics? Q2. Why does it not work without Evaluate[...]? Q3. Why does it work with simply using DisplayFunction -> $DisplayFunction? May it be that the implementation of option-passing was screwed up in DiscreteMath`Graphplot? Istvan Zachar === Subject: Re: Trig Solve > Could not get solution for easier implicit trig. relation Solve[{x, y} == {Cos[th]*(3 + Cos[th/2 + v]), (3 + Cos[th/2 + > v])*Sin[th]}, {th, v}, {x, y}] > Narasimham > It is completely unclear to me what you mean be a solution to this equation. What are you trying to solve' in terms of what? Note that the code you have written is actually telling Solve to eliminate x and y ?Solve Solve[eqns, vars] attempts to solve an equation or set of equations for the variables vars. Solve[eqns, vars, elims] attempts to solve the equations for vars, eliminating the variables elims. which is obviously impossible. Andrzej Kozlowski === Subject: Trig Solve Could not get solution for easier implicit trig. relation Solve[{x, y} == {Cos[th]*(3 + Cos[th/2 + v]), (3 + Cos[th/2 + v])*Sin[th]}, {th, v}, {x, y}] Narasimham === Subject: StoppingTest options (need help) I'm using the NDSolve command to find a closed curve (it's a magnetic field line). It works, but I need to end the calculation at a specific point in space, so I don't get a curve with many turns. I only want a single turn to draw a complete loop. How can I use the StoppingTest options to tell Mathematica to find a single turn loop ? The specific code is like this : NDSolve[ { x'[t] == Bx[x[t], y[t], z[t]], y'[t] == By[x[t], y[t], z[t]], z'[t] == Bz[x[t], y[t], z[t]], x[0] == 0, y[0] == 1, z[0] == 0, }, {x, y, z}, {t, 0, 100}, StoppingTest -> ( ? ? ? )] Suppose I want the curve to stop at coordinates {x, y, z} = {1, 2, 3}, or better, I want it to be a complete loop with a single turn (stop when it's back at the initial coordinates). How can I tell that to Mathematica ? === Subject: RE: GraphPlot display anomaly I tried it also on 5.1 in Windows98 and it also crashed there. It does not crash if there is a complete cycle. The following works properly in 5.1 and 5.2. Needs[DiscreteMath`GraphPlot`]; GraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 4 -> 5, 5 -> 6, 6 -> 7, 7 -> 8, 8 -> 1}, EdgeStyleFunction -> (Arrow[{#1, #2}] &)]; The following crashes in both versions. GraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 4 -> 5, 5 -> 6, 6 -> 7, 7 -> 8}, EdgeStyleFunction -> (Arrow[{#1, #2}] &)]; I wonder if anyone else with Windows has this problem? David Park djmp@earthlink.net http://home.earthlink.net/~djmp/ === Subject: Re: GraphPlot display anomaly Everything works without a glitch here, but I only have: $Version Andrzej Kozlowski > Whenever I try to evaluate that statement, or the original posters > statement, or any GraphPlot statement that doesn't have a complete > cycle, my > Mathematica 5.2 crashes! For example, the following statement that deletes a number of edges > from the > example in Help crashes. Needs[DiscreteMath`GraphPlot`]; GraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 4 -> 5, 5 -> 6, 6 -> 7, 7 -> 8}, > EdgeStyleFunction -> (Arrow[{#1, #2}] &)]; crash! David Park > djmp@earthlink.net > http://home.earthlink.net/~djmp/ > The only problem is with your code. The correct way to do this is: > Needs[DiscreteMath`GraphPlot`]; > GraphPlot[{1 -> 2}, > ImageSize -> {50, 50}, > DisplayFunction -> (Display[$Display, #] &) > ]; Note the crucial parentheses missing from original code. > I think the answers to all your questions should now be self-evident. Andrzej Kozlowski > Tokyo, Japan === Subject: Re: How can a dump file with 1.28MB have nothing in it? > I have been saving my intermediate results to a dump file during the > course of a very large notebook (~10MB, ~800 lines). I decided to > begin a new notebook, and begin it by opening the dump file. When I > started a new notebook and loaded the dump file, I could no longer find > any of the symbol definitions saved from the old notebook. How did > this happen? How can I retrieve the information in the dump file? > How can anyone answer this question - as you have supplied no code! I must say, however, I would not store important results in binary format - it probably takes up less disk space, but if something goes wrong, you have nothing. If you ARE going to use DumpSave, I would at least check that it is working as you expect early on in the process. Are you performing a calculation that takes an excessively long time to run, and if so, are you sure this could not be speeded up in some way so that there is no need to do the calculation in several stages. If you supply more details of your problem, I am sure someone here will be able to help - although probably not to salvage your previous results! David Bailey http://www.dbaileyconsultancy.co.uk === Subject: Re: Speeding up HermiteH[Range[0,p],x] I think what you are asking is why, in expressions such as HermiteH[Range[0,p],x], Mathematica does not do what a mathematician might do, and calculate one value from the previous one using a recurrence relation. However, can you imagine the number of special cases of this sort that would have to be coded into Mathematica software to make this a reality! Also, at least for some functions, the repeated use of a recurrence relation might build up rounding errors if x is numeric. David Bailey http://www.dbaileyconsultancy.co.uk === Subject: regularize a function (proof function) I want to regularize a function, I want that it is C^inf and with compact support (proof function for distributions). I start with: a = -1; b = 1; theta[x_] := (-x^2) + 1 f[x_] := If[x < b && x > a, theta[x], 0] Plot[f[x], {x, -2, 2}]; Now f[x] is with compact support, but it's not C^inf. I do: phi[epsilon_, x_] := If[x >=epsilon || x <= (-epsilon), 0, Exp[(-epsilon^2)/((epsilon^2 - x^2))]]) Plot[phi[1,x],{x,-1,1}]; this is a proof function. I define g[epsilon_, x_] := (Int[phi[epsilon, Abs[x - y]] f[y] {y,-inf,inf}]) / (Int[phi[epsilon, Abs[y]] {y,-inf,inf}]) Now I want to see it: Plot[g[1,x],{x,-2,2}] It has a loss of precision, how can I solve it? === Subject: RE: GraphPlot display anomaly Whenever I try to evaluate that statement, or the original posters statement, or any GraphPlot statement that doesn't have a complete cycle, my Mathematica 5.2 crashes! For example, the following statement that deletes a number of edges from the example in Help crashes. Needs[DiscreteMath`GraphPlot`]; GraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 4 -> 5, 5 -> 6, 6 -> 7, 7 -> 8}, EdgeStyleFunction -> (Arrow[{#1, #2}] &)]; crash! David Park djmp@earthlink.net http://home.earthlink.net/~djmp/ The only problem is with your code. The correct way to do this is: Needs[DiscreteMath`GraphPlot`]; GraphPlot[{1 -> 2}, ImageSize -> {50, 50}, DisplayFunction -> (Display[$Display, #] &) ]; Note the crucial parentheses missing from original code. I think the answers to all your questions should now be self-evident. Andrzej Kozlowski Tokyo, Japan === Subject: List Manipulation I'm not sure if the following is possible or whether it exists somewhere between the realms of fantasy and science fiction. I have been unable to do it. Given a list, set, vector (whatever you want to call it) consisting of functions of the same variable, i.e. list = {a1+b1*k, a2+b2*k, a3+b3*k...} Assuming they are all linear (of the form a+b*k) is there away to isolate the a_i and b_i values? Essentially I would like to get a list A consisting of all the intercept values, and a list B consisting of all the slope values. Is this possible? What kind of operations do I need to use to accomplish this (if indeed it is possible)? === Subject: Re: nestled plotting A follow up question. It's easy to set xmax and xmin when plotting. Is there a way to set ymax and ymin (or z in 3d)? I can't find any obvious way in the help. Hadoque Norbert Marxer skrev: > Hello > > All you have to do is to insert Evaluate in front of the Table command: > e.g. > > Plot[Evaluate@Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}], {x, > -15, 15}]; > > Norbert Marxer > > www.mec.li > > > >> Hi >> I'm having this problem. I want to plot a number of maclaurin >> polynomials and I want to do it like this: >> Plot[Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}], {x, -15, 15}] >> This gives me a bunch of error messages. However, if I first print the >> table: >> Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}] >> and cut and pase this into the plot command, everything works just as I >> want it. How do I get past the cut and paste step? >> /Hadoque > === Subject: [Admin] Missing posts It has been pointed out that some of the messages in the past week or so have not been getting out to readers. I believe this is due to the huge volume of spam that my mail server has been getting, overwhelming the machine at times. I have a list of messages that did not go out fully and I am going to resend them. My apologies if some of you got these already. Steve Christensen Moderator