Re: FindRoots?
To Andrzej Kozlowski and MathGroup,
Yes, I was too harsh in using the word "snobbery". But I feel that it is not
good to let the best (the Semenov method?) be an enemy of the good
(RootSearch), when the Semenov method not yet is fully implemented. You have
argued for the capabilities of Reduce to find zeroes, so I wonder of course
if a routine based on the Semenov method would fail in a similar way. So
much better if it does not. Maybe we should ask MathGroup, if there is
anyone willing to implement your demonstrations as a more general package?
The code does not look too difficult, ev
|
9/9/2010 9:31:04 AM
|
0
|
"Ingolf Dahl" <ingolf.d...@telia.com>
|
|
|
LinearModelFit
Hi,
the function LinearModelFit has a parameter named "Response". In my
understanding, this should return the values of the fit function at the
abscissae of the input values. However, what is returned are the y
values of the input.
Looks like a bug to me, what do you think?
Daniel
|
9/9/2010 9:31:15 AM
|
0
|
Daniel Huber <...@metrohm.com>
|
Re: FindRoots?
On 9 Sep 2010, at 09:50, Ingolf Dahl wrote:
> To Andrzej Kozlowski and MathGroup,
>
> However, in order to implement the Semenov method and to obtain provable
> results, you state that there are "certain mild conditions" that must be
> fulfilled. These conditions seem to be that the program needs to obtain
> explicit and valid upper bounds for the first and second derivatives. The
> task to find these bounds cannot be automated in a provable way in the
> general case, so one problem has effectively been replaced by another. One
> could put the responsibility to solve this second p
|
9/9/2010 9:31:26 AM
|
0
|
Andrzej Kozlowski <akozlow...@gmail.com>
|
Display Workspace
Is there a way to dynamically display and update all currently defined
global variables and their values/definitions?
Im trying to come up with some code to that will emulate the
"Workspace" window in another system's session, but I am having difficulty
getting it to work.
Any suggestions?
Thanks,
Wayne Weaver
|
9/9/2010 8:22:18 AM
|
0
|
WWeaver <wayne.w.wea...@gmail.com>
|
System of linear equation
Hi community,
I have a system of linear equation 8x8. So I use LinearSolve but I
obtain
LinearSolve::matrix: Argument (<<1>>) at position 1 is not a nonempty
rectangular matrix.
I don't know why doesn't work this program.
Please help.
|
9/9/2010 8:23:13 AM
|
0
|
mfduqued <mfduq...@gmail.com>
|
Re: locating overlow/underflow (and the issue of accuracy)
On 9/7/10 at 6:07 AM, nbbienia@cyf-kr.edu.pl (Leslaw Bieniasz) wrote:
>Well, I am afraid you do not answer my question. Assuming that I
>eliminated the underflow/overflow error messages by restricting down
>the range of y, for which I tabulate my expression, what is the
>accuracy of the results I obtain? Can I trust that it is 70
>significant digits? This is what I need to know in the first place.
>If there are limitations of N[] in this respect, then how can I know
>if the limitations enter into play? Does the fact that I don't get
>error messages or warnings mean that there are no
|
9/9/2010 8:24:20 AM
|
1
|
Bill Rowe <readn...@sbcglobal.net>
|
Help with Solve
Hello!
A newb question I'm sure... :-)
Here's a couple of equations:
eq1 = n*Sin[x] == (m*v^2)/r;
eq2 = n*Cos[x] == m*g;
The goal is to solve for 'x'.
I can do this in a roundabout way via:
Solve[eq1 /. Solve[eq2, n], x]
I.e. solve eq2 for 'n', substitute this into eq1, and solve the result
for 'x'. But this approach seems too "manual".
Is there a more straightforward way to carry out the problem? I tried
this:
Solve[{eq1, eq2}, x]
but it doesn't seem to work. What's a good way to go about this?
Thanks!
Ed
|
9/9/2010 8:23:34 AM
|
0
|
Eduardo Cavazos <wayo.cava...@gmail.com>
|
Re: FindRoots?
On 7 Sep 2010, at 10:02, Ingolf Dahl wrote:
> But anyway, I consider it as snobbery to say that Reduce is superior to
> RootSearch. They do not play in the same division, and perform different
> tasks.
Why should it matter to me what you call it? Is that an argument?
If you read what I have written on this subject you may noticed that there
are ways to do essentially the same things that RootSearch attempts to do and obtain the complete set of roots (provably complete) (I am not referring to using Reduce). That, I do call "superior" and really I don't care if anyone thinks it's
|
9/8/2010 4:57:47 AM
|
0
|
Andrzej Kozlowski <akozlow...@gmail.com>
|
Re: Please help
On 7 Sep 2010, at 08:02, olfa wrote:
> On 5 sep, 11:28, Andrzej Kozlowski <a...@mimuw.edu.pl> wrote:
>> On 4 Sep 2010, at 10:00, olfa wrote:
>>
>>> Hi Mathematica Community,
>>
>>> Is Mathematica able to detect(recognize) implication between equations?
>>
>>> Thank you.
>>
>> Your question is not clear enough to answer with much confidence but at least Mathematica can do things like these:
>>
>> Assuming[x^2 + y^2 ======== 1, Refine[x^4 + 2 x^2 y^2 + y^4 ======
> ==== 1]]
>>
>> True
>>
>> or
>>
>> Assuming[x^2 + y^2 ======== 1, Refine[x ======== 0 || x^2 + y^2 ==
> ====
|
9/8/2010 4:57:58 AM
|
0
|
Andrzej Kozlowski <a...@mimuw.edu.pl>
|
drawing polygon diagonals
Hi,
This seems basic but it has me stumped. I'm trying to illustrate the
idea of the "handshake problem", where small circles represent people
and the lines between the circles represent handshakes. With the code
below, I'm able to show (and manipulate) any number of circles, and
I'm also able to show the lines between adjacent circles. This just
generates a polygon whose vertices are all connected, as it should.
But how can I update my code to show the diagonals, too, and not just
the sides of the polygon? I'm not sure what to add.
Thanks!
MH
=================
Manipu
|
9/8/2010 4:58:31 AM
|
2
|
MH <matthewh...@gmail.com>
|
Re: SelectionMove[nb,Next,?Group?]
Jeremy,
>From the tenor of your three questions it seems clear that you are
interested in using Mathematica to both develop technical material and
present it in a semi-classical style, while taking advantage of the active
dynamics of Mathematica.
The normal Mathematica working paradigm is Input/Output cells in a
Mathematica notebook. However, this is not the paradigm for classical
technical papers. Quite often the "input" part will be "boiler plate"
specification that you may not be interested in showing to the reader,
especially if it involves custom graphics, tables or dynamics.
|
9/8/2010 4:58:42 AM
|
0
|
"David Park" <djmp...@comcast.net>
|
Re: FindRoots?
On 7 Sep 2010, at 18:40, Andrzej Kozlowski wrote:
>
> On 7 Sep 2010, at 10:02, Ingolf Dahl wrote:
>
>> But anyway, I consider it as snobbery to say that Reduce is superior to
>> RootSearch. They do not play in the same division, and perform different
>> tasks.
>
> Why should it matter to me what you call it? Is that an argument?
>
> If you read what I have written on this subject you may noticed that there are ways to do essentially the same things that RootSearch attempts to do and obtain the complete set of roots (provably complete) (I am not referring to using Reduce). That,
|
9/8/2010 4:59:15 AM
|
1
|
Andrzej Kozlowski <akozlow...@gmail.com>
|
Generating table of contents
Hi all,
Thought I could solve this myself easily, but alas, I don't seem to be
able to find the method to generate the table of contents of a
Mathematica document I'm working on. Anyone knows this feauture's
hideout?
Cheers -- Sjoerd
|
9/8/2010 5:00:09 AM
|
0
|
"Sjoerd C. de Vries" <sjoerd.c.devr...@gmail.com>
|
Re: FindRoots?
On Tue, Sep 7, 2010 at 3:26 AM, Andrzej Kozlowski <akozlowski@gmail.com> wrote:
> Well, as far as I can tell, none of these concern not "packages" that are
> already available for download from the Internet (free or not). I think such
> cases are very different and normally the authors should take full
> responsibility for them themselves. There may be of course exceptions
> (arguably Combinatorica was one of them) but they should be v. rare.
I'm not sure what your point is, since I can't really tell what your
first sentence means. I can say that all the specific examples I
referr
|
9/8/2010 5:00:19 AM
|
0
|
Mark McClure <mcmcc...@unca.edu>
|
Re: How to delay action of ...[[i]] (Part[...,i])
On Tue, Sep 7, 2010 at 9:59 AM, Greylander <greylander@gmail.com> wrote:
> I have answered my own question! And understand a bit more how to
> 'think' in Mathematica...
>
> The problem is that Part[[]] acts on any expression. What I have
> finally figured out is that I need a version of part (or a version of
> [[...]]) that acts *only* on lists (i.e. expressions with "List"
> head), and searching and exploring the documentation, I eventually
> learned how to do that. This will have exactly the desired result.
>
> Here is what I did:
>
> VPart[expr_List,k_] :=Part[expr,k]
|
9/8/2010 5:00:40 AM
|
1
|
Leonid Shifrin <lsh...@gmail.com>
|
Re: problem with RandomInteger
On 9/7/2010 12:59 AM, Istv=E1n Zachar wrote:
> Nice debugging Mark!
> WRI should confirme this, and include a bugfix in the next release.
> That would certainly be reassuring.
> Istvan
>
I have checked the examples in this thread in the version currently
under development. They work fine in that version, so it appears the
underlying problem has been addressed and these examples should be fine
in the next release. I apologize for any inconvenience this may have caused.
Darren Glosemeyer
Wolfram Research
|
9/8/2010 5:00:51 AM
|
0
|
Darren Glosemeyer <darr...@wolfram.com>
|
Re: Sorting a list of names
Use SortBy:
In[2]:= SortBy[names, Last[StringSplit[#1, " "]] & ]
Out[2]= {"Mackenzie Christensen", "Cole Dockter", "Rebecca Eastham",
"Cecilia Ford", "David Gartzke", "Tyler Hullett", "Matthew \
Lundberg",
"Grant Patterson"}
Adriano Pascoletti
On 20100907, at 08.02, Jon Joseph wrote:
> All: I have a list of names read in as strings with first names first.
> Can anyone suggest a mechanism to sort the list by the last names with
> the final output being the entire name?
>
> Starting array:
>
> names = {"Cole Dockter", "Mackenzie Christensen", "Rebecca Eastham"
|
9/7/2010 10:08:08 AM
|
0
|
Adriano Pascoletti <adriano.pascole...@uniud.it>
|
Re: Sorting a list of names
Try
Sort[Transpose[{StringSplit[names][[All, 2]], names}]][[All, 2]]
Best regards
Ingolf Dahl
> -----Original Message-----
> From: Jon Joseph [mailto:josco.jon@gmail.com]
> Sent: den 7 september 2010 08:03
> To: mathgroup@smc.vnet.net
> Subject: Sorting a list of names
>
> All: I have a list of names read in as strings with first names first.
> Can anyone suggest a mechanism to sort the list by the last names with
> the final output being the entire name?
>
> Starting array:
>
> names = {"Cole Dockter", "Mackenzie Christensen", "Rebecca Eastham",
> "David Gartzke
|
9/7/2010 10:07:25 AM
|
0
|
"Ingolf Dahl" <ingolf.d...@telia.com>
|
Re: FindRoots?
On 7 Sep 2010, at 06:03, Mark McClure wrote:
> On Mon, Sep 6, 2010 at 4:13 AM, Andrzej Kozlowski <akozlowski@gmail.com> wrote:
>
>> The point of my original post was not that Mathematica should not have
>> a functionality to produce complete solutions of numerical equations but
>> that leasing packages from users is not the right approach for Wolfram.
>> ...
>> I know of only one exception that WRI has made to this rule: the
>> Combinatorica package, co-authored by Steven Skiena
>
> Actually, Mathematica contains quite a lot of code authored by users.
> The palettes introduced i
|
9/7/2010 10:08:18 AM
|
0
|
Andrzej Kozlowski <akozlow...@gmail.com>
|
Make a nested list in a loop!
initdata = Import[datadir, "Data"];
f = 1;
Do[
If[omin <= initdata[[e, 2]] <= omax, data[f] = initdata[e]; f = f +
1]
, {e, 1, Length[initdata]}];
Can someone please help, I'm trying to create a nested list from some
data that is already as a nested list. Basically initdata has loads of
rows but only 5 columns and looks as follow:
{{a,b,c,d,e},{f,g,h,i,j},{k...etc.
I'm trying to reduce the number of rows by comparing the 2nd column of
each row to a predefined maximum and minimum (omax, omin
respectively). Then if this value is accepted, the whole row gets
nested into the
|
9/7/2010 6:00:49 AM
|
1
|
Sebastian <sebpin...@googlemail.com>
|
Changing from Utopia font to arial
I like using arial 10 pt as my base font. It is more compact and I
find it easier to read.
I have checked previous posts which tend to talk about font
substitutions and the like and relate to earlier versions.
How do I change the default font (if there is such a thing) for all
notebooks at a global level
or by inserting a little code at the beginning of each notebook in an
initialisation cell.
Jeremy Duncan
|
9/7/2010 6:00:59 AM
|
1
|
apjs64 <apj...@gmail.com>
|
SelectionMove[nb,Next,?Group?]
I like the way mathematica uses groups and cells. In particular, I
would like to write code in a number of cells, encase in a group and
then close the group. When evaluation takes place I would like the
code group to remain closed and the output to be inserted between one
code group and the next. I have tried various combinations of
SelectionMove (including the optimistic
SelectionMove[nb, Next, Group]) but have not found a solution. Any
ideas?
thanks,
Jeremy
|
9/7/2010 6:01:10 AM
|
0
|
apjs64 <apj...@gmail.com>
|
notebooks default context
Firstly a problem, my packages (.m) keep having their context reset
to global every time I open them to edit rather than "unique to each
cell" to which I have previously set them to.
THIS IS THE QUESTION (rest waffle)
I would like to set a notebooks default context to "Unique to each
cell" in a notebook initialisation cell. Usually I use "Unique to this
notebook" from the menu (which is fine and persists), however on
occasion I would like to tighten things up.
------------
WAFFLE
------------
I think I don't clearly understand the use of the Package` context
instructions. My
|
9/7/2010 6:01:20 AM
|
1
|
apjs64 <apj...@gmail.com>
|
Re: NDSolve -- n-body indexing ([[]]) problem
I misunderstood your question -- please ignore my previous response.
Themis
|
9/7/2010 6:01:31 AM
|
0
|
Themis Matsoukas <tmatsou...@me.com>
|
What is the problem? There are no images and no wrong reports for this small program.
Hello Mathematica community, I really need some help....
I realized there are some mistakes in this program, but I can't find
out what it is, I keep trying for weeks, still there are some
problem, I never used Mathematica before
a==Exp[(-2r^2)/3];
b==BesselJ[0,(r*Sqrt[x^2+y^2])/0.8];
c==r^2;
d==5a;
Plot[Abs[Integrate[r*b*a*Exp[-I(c+d)]dr,{r,0,=E2=88=9E}]]^2,{x,-0.01,0.01},
{y,-0.01,0.01}]
=EF=BC=88I is Complex i=EF=BC=89
|
9/7/2010 6:02:03 AM
|
0
|
peter <justwanglun...@gmail.com>
|
Re: FindRoots?
On Mon, Sep 6, 2010 at 4:13 AM, Andrzej Kozlowski <akozlowski@gmail.com> wrote:
> The point of my original post was not that Mathematica should not have
> a functionality to produce complete solutions of numerical equations but
> that leasing packages from users is not the right approach for Wolfram.
> ...
> I know of only one exception that WRI has made to this rule: the
> Combinatorica package, co-authored by Steven Skiena
Actually, Mathematica contains quite a lot of code authored by users.
The palettes introduced in V7 were created by Eric Schultz of Walla
Walla Community Coll
|
9/7/2010 6:02:13 AM
|
0
|
Mark McClure <mcmcc...@unca.edu>
|
Sorting a list of names
All: I have a list of names read in as strings with first names first.
Can anyone suggest a mechanism to sort the list by the last names with
the final output being the entire name?
Starting array:
names = {"Cole Dockter", "Mackenzie Christensen", "Rebecca Eastham",
"David Gartzke", \
"Matthew Lundberg", "Tyler Hullett", "Cecilia Ford", "Grant Patterson"}
Ending array:
names_sorted = {"Mackenzie Christensen", "Cole Dockter", "Rebecca
Eastham", "Cecilia Ford", "David Gartzke", "Tyler Hullett", "Matthew
Lundberg", "Grant Patterson"}
As a note Sort[StringSplit[names][[Al
|
9/7/2010 6:02:45 AM
|
4
|
Jon Joseph <josco....@gmail.com>
|
Re: FindRoots?
Perhaps that's the case with add-on packages, literally. But my
understanding is that WRI has licensed some technology from others. In
fact, I recall an explicit statement at a Mathematica conference that
they saw no reason to "reinvent the wheel" and were therefore going to
use (I think this is what the item is:) a 3rd party floating-point
library from then on instead of continuing to "roll their own".
On 9/6/2010 4:13 AM, Andrzej Kozlowski wrote:
> The point of my original post was not...
> but that leasing packages from users is not the right approach for Wolfram.
> The
|
9/7/2010 6:02:56 AM
|
0
|
Murray Eisenberg <mur...@math.umass.edu>
|
Re: Finite Groups...infinite disappoinment
On 9/6/2010 3:15 AM, David Bailey wrote:
[snip]
> My feeling is that you hit the nail on the head - the idea of curated
> data over such a broad range is basically not possible. Another such
> area is chemical information, thus you are rewarded by:
>
> ChemicalData["Caffeine"]
>
> however
>
> ChemicalData["Copper Sulphate"]
>
> or
>
> ChemicalData["Copper Sulfate"]
>
You need to use a standard camelcased name:
In[30]:= ChemicalData["CopperSulfate"]
Out[30]= {"CopperIISulfate", "CopperIISulfatePentahydrate",
"CopperIISulfateHydrate"}
You can also use a chemi
|
9/7/2010 6:03:17 AM
|
3
|
"Carl K. Woll" <ca...@wolfram.com>
|
A dragging matter of Interpretation
If you go to the Interpretation page in the Doc center, and try to
reproduce the example described there: Interpretation["x",1] on
another nb, you may - or may not - succeed.
The documentation says that you can copy and paste the output of
Interpretation["x",1] onto another cell and you should get something
that looks like "x", but when evaluated acts like 1.
Well...I did not succeed in replicating this at first.
That is because I often, very often, select things by multiple-
clicking on them.
In this case, this technique does not work.
I do get the "x", but it stays an "x". That
|
9/7/2010 6:03:28 AM
|
2
|
magma <mader...@gmail.com>
|
Re: Holding arguments of a family of functions
Write as a Function, and checkout the last note on the Function Help page.
f[1,3]:= Function[y, ..., {HoldFirst}]
David Park
djmpark@comcast.net
http://home.comcast.net/~djmpark/
From: magma [mailto:maderri2@gmail.com]
I am building a family of functions, parametrized by 2 variables.
These functions take one argument, so i have these definitions:
f[1,3][y_]:=....
f[1,2][y_]:=....
f[1,3][y_]:=...
f[2,1][y_]:=....
etc. As you see it's a case of subvalues being defined.
The problem is that I also require that the y argument should be held.
That is the function
|
9/7/2010 5:59:23 AM
|
0
|
"David Park" <djmp...@comcast.net>
|
proof of recursion
Good evening!
I have a big problem with proving the equivalence of two formulas. I
tried an induction but without success :
1) S_{m}(z)=(1/z)* \sum_{k=0}^{m-1} ( S_{k}(z)/(m-k)) where S_{0}
(z)=S(z)/z
2) S_{m}(z)=S(z)/(m!z^{m+1}) \sum _{k=1}^{m} (k! S(m,k) z^{m-k})
where S(m,k) is a Stirling number of a first type.
I will be grateful for your suggestion.
Magda
|
9/6/2010 8:15:29 AM
|
0
|
Magdalena Moczydlowska <magdamoczydlow...@gmail.com>
|
Re: FindRoots?
I do not find any reference to or instance of FindRoot in the RootSearch
code.
David Park
djmpark@comcast.net
http://home.comcast.net/~djmpark/
From: Andrzej Kozlowski [mailto:akozlowski@gmail.com]
This is, of course, not an argument against having in Mathematica the sort
of capabilities that Gianluca wrote about. Rather, I don't think the
existing RootSearch actually offers them, since I think it relies on the
built in FindRoot function. Although FindRoot is indeed intended for solving
numerical equations I do not think it can be reliably used with
InterpolatingFuncti
|
9/6/2010 8:13:10 AM
|
0
|
"David Park" <djmp...@comcast.net>
|
How to delay action of ...[[i]] (Part[...,i]) until appropriate time?
Consider the following toy example:
in> goo[v_] := v.{1, 1}*(3 v)
in> foo[k_][v_] := goo[v] [[k]]
in> goo[nnn]
out> 3 nnn nnn.{1, 1}
in>foo[1][{2, 3}]
out>30
in> foo[2][nnn]
out>nnn
Notice how in this last output, because the parameter nnn is
undefined, [[k]] ends up acting on the structure of the expression in
goo, but the intuitive behavior would be for evaluation of [[k]] to
also be delayed. The output I would like to see is:
in>foo[2][nnn]
out> ( 3 nnn nnn.{1,1} ) [[2]]
in> nnn = {4,5}
%
out> 135
But of course it does not happen that way.
I realize
|
9/6/2010 8:13:42 AM
|
3
|
Greylander <greylan...@gmail.com>
|
Re: FindRoots?
It has been a long time since I looked at the source code of the RootSearchpackage (Ted sent it to me several years ago). I forgot the details of it and when writing this simply assumed it used FindRoot or an essentially equivalent method. In fact it implements Brent's method, which is of course one of the values of the Method option in FindRoot. I don't know exactly why Ted did wanted to implement this independently, but in any case it is not relevant to my comments. Everything "mathematical" that I wrote applies just as much to RootSearch as to FindRoot.
The point of my original post was
|
9/6/2010 8:13:21 AM
|
0
|
Andrzej Kozlowski <akozlow...@gmail.com>
|
Holding arguments of a family of functions
I am building a family of functions, parametrized by 2 variables.
These functions take one argument, so i have these definitions:
f[1,3][y_]:=....
f[1,2][y_]:=....
f[1,3][y_]:=...
f[2,1][y_]:=....
etc. As you see it's a case of subvalues being defined.
The problem is that I also require that the y argument should be held.
That is the functions should have something like
Attributes[f[m,n]]={HoldFirst};
But this is not acceptable to Mathematica, since Attributes only takes
symbols.
Even using
Attributes[f]={HoldAll};
does not seem to work.
So , how can i keep the a
|
9/6/2010 8:13:53 AM
|
0
|
magma <mader...@gmail.com>
|
Help with differential equation
Dear experts,
I tried solving the following differential equation using DSolve:
y' ' [x]+a( y' [x] ) = b( cos[y] )
But I got error message which asked me to provide proper arguments for
cos..
So I changed cos[y] to cos[kx] and obtained solution...
However, I have to solve the equation by keeping cos[y] in order to
obtain a solution of relevance to my work.
Please help.
praveen
|
9/6/2010 8:14:36 AM
|
3
|
mathpavi <elvisgracel...@gmail.com>
|
Matrix with number of rows / columns not fixed
I'm new to Mathematica and would like to know if I can specify a
matrix where the number of rows / columns is not fixed.
As a simple example, how can I input a diagonal matrix with elements
(s1, s2, ..., sL) where I don't specify what L is?
I'd like to multiply together a few such matrixes and find the inverse
of the product, and would ideally like Mathematica to give me the
answer in terms of summations from 1 to L.
Hope this sounds possible...!
|
9/6/2010 8:14:46 AM
|
2
|
Hayley <hayley0...@gmail.com>
|
Finite Groups...infinite disappoinment
I have just checked some basic info using FiniteGroupData.
I was looking for some MultiplicationTable for some groups.
Indeed you can get the MultiplicationTable for the Quaternion group
without a problem
FiniteGroupData["Quaternion", "MultiplicationTable"]
but no such luck with many/most other groups.
For example:
FiniteGroupData["C2", "MultiplicationTable"]
and also
FiniteGroupData["D4", "MultiplicationTable"]
both return Missing[NotAvailable]
Consulting the wonderful wizard of W.Alfa you get....
well exactly the same.
No MultiplicationTable for either group.
|
9/5/2010 11:08:35 AM
|
0
|
magma <mader...@gmail.com>
|
Problems with replacement rules inside functions
Hi!
I am working on a problem that involves fitting a Mathematica calculation to
some data. To do this, I am trying to create a function (called
"spinwavecalc") that contains all of the necessary calculations based on the
input parameters J1 through J4. The end of this function calculates the
square of the difference between the calculation and the data.
I want to put this function into NMinimize like so:
NMinimize(spinwavecalc, {J1,J2,J3,J4});
spinwavecalc is a large function so I will show you the sorts of problems
I'm having with the simple example below:
test3 := (Print[J
|
9/5/2010 9:26:51 AM
|
0
|
Kate Ross <ross...@mcmaster.ca>
|
Re: Time Series Data in Quarters
Jroge:
Try
In[1]:= data = {{{"2007, Q1"}, 10},{{"2007, Q2"}, 20},{{"2007, Q3"},
30},{{"2007, Q4"}, 40}}
Out[1]= {{{2007, Q1},10},{{2007, Q2},20},{{2007, Q3},30},{{2007, Q4},40}}
In[2]:= DateListPlot[data, DateFunction :>
(DateList[ToString[StringReplace[#,{"Q1" -> "03, 01", "Q2" -> "06, 01","Q3"
-> "09, 01","Q4" -> "12, 01"}]]] &), DateTicksFormat->{"Year", " ",
"QuarterNameShort"}]
"Quarter", "QuarterName", and "QuarterNameShort" are geared towards output
regrettably not for datetime parsing to Date.
You may wish to choose different Month and Day for the replacement rules
|
9/5/2010 9:27:04 AM
|
0
|
"Hans Michel" <hmic...@cox.net>
|
user-defined functions in KeyEventTranslations.tr
Mathematica would be about 200% more useful if I could call my own
functions from KeyEventTranslations.tr. Does anybody know a way of
accomplishing this? On this board, examples of item entries in the
file take this form:
Item[KeyEvent["...", Modifiers -> {...}], FrontEndExecute[...]
Is there any way to communicate with the Kernel through
FrontEndExecute[] here?
Thanks, All
|
9/5/2010 9:27:25 AM
|
0
|
AlexG <alexander.gurfin...@gmail.com>
|
Re: FindRoots?
Hola:
In each re-posting of the original messages, cf. below, the Equal signs appear to increase in number according to two to the power n, n positive integer.
Here == I wrote one equal sign. Just ONE.
Best regards,
MATTHIAS BODE
COCHABAMBA/BOLIVIA
> Date: Sat, 4 Sep 2010 03:58:24 -0400
> From: akozlowski@gmail.com
> Subject: Re: FindRoots?
> To: mathgroup@smc.vnet.net
>
>
> On 3 Sep 2010, at 12:10, Gianluca Gorni wrote:
>
> >
> > In my opinion Reduce can replace RootSearch in some
> > cases but not in others.
> >
> > First of all, Reduce has bugs. Here is an a
|
9/5/2010 9:27:36 AM
|
0
|
Matthias Bode <lvs...@hotmail.com>
|
Re: <Null> while building lists
maxima[f_] :==
Block[{old == f[[1]], m == {}},
For[i == 2, i < Length[f]/2, i++,
If[f[[i]] > old && f[[i + 1]] < f[[i]], AppendTo[m, {i, f[[i]]}]];
old == f[[i]]] m;]
I appended ; after final m. Maybe that is it?
Jeremy
--- On Sat, 4/9/10, Andy <andyr@wolfram.com> wrote:
> From: Andy <andyr@wolfram.com>
> Subject: Re: <Null> while building lists
> To: mathgroup@smc.vnet.net
> Received: Saturday, 4 September, 2010, 6:02 PM
> On 9/3/2010 5:09 AM,
> Alessandro wrote:
> > Hi group,
> > I'm sure I'll bang me on my head as soon as I will
> Press<Post
> > Mess
|
9/5/2010 9:26:06 AM
|
1
|
jeremy duncan <jeremy...@yahoo.com>
|
Re: Question about ArrayFlatten
In[59]:= genindex = Range[2];
m1 = ConstantArray[0, {2*Length[genindex], 2*Length[genindex]}];
m2 = ConstantArray[0, {Length[genindex], 2*Length[genindex]}];
m3 = ConstantArray[0, {Length[genindex], Length[genindex]}];
m4 = IdentityMatrix[Length[genindex]];
Au1 = ArrayFlatten[{{m1}, {m2}, {ArrayFlatten[{{m3, m4}}]}}]
Out[64]= {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0,
0},
{0, 0, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}
Adriano Pascoletti
2010/9/4 lightnation <lightnation@naver.com>
> The coding below is not working. I don't know what is wrong.
> Please
|
9/5/2010 9:26:17 AM
|
0
|
Adriano Pascoletti <adriano.pascole...@uniud.it>
|
Re: problem with RandomInteger
You are defining str1[] with an empty list of arguments. I don't see the purpose for that. If you remove the [], then everything works fine:
str1 := Module[{l, i, j}, l = {0, 0, 0};
i = RandomInteger[{1, 3}];
l[[i]] = 1;
j = RandomInteger[{1, 3}];
l[[j]]]
n = 500;
N[Total[Table[str1, {n}]]]/n
0.324
Themis
PS: You may want to talk to someone at wolfram about this. As others pointed out, your initial code works if n<249 and breaks down if n is larger. I also noticed that if you remove l, i, j from the list of localized variables, your initial code works for any n. Wo
|
9/5/2010 9:28:08 AM
|
1
|
Themis Matsoukas <tmatsou...@me.com>
|
Re: NDSolve -- n-body indexing ([[]]) problem
The problem is that your differential equations are stochastic. I asked wolfram about it (see email below) using the following as a minimal example (which doesn't work):
Remove@g1
g1[t_?NumberQ] := (RandomReal[] - 0.5)*t;
sln = NDSolve[{
y'[t] == g1[t],
y[0] == 0
}, {y}, {t, 0, 1}]
Plot[Evaluate[y /. sln[[1]]][t], {t, 0, 1}, PlotRange -> All,
AxesOrigin -> {0, 0}]
Wolfram's answer is basically that you cannot do this NDSolve. Tech support suggested to use RecurrenceTable:
Remove@g1 ; Clear [a, pp];
g1[t_?NumberQ] := (RandomReal[] - 0.5)*t; dt = 0.0001;
pp = Recur
|
9/5/2010 9:28:18 AM
|
2
|
Themis Matsoukas <tmatsou...@me.com>
|
Re: Question about ArrayFlatten
On 9/4/10 at 4:01 AM, lightnation@naver.com (lightnation) wrote:
>The coding below is not working. I don't know what is wrong. Please
>give me some advice.
>m1 = ConstantArray[0, {2 Length[genindex], 2 Length[genindex]}];
>m2 = ConstantArray[0, {Length[genindex], 2 Length[genindex]}];
>m3 = ConstantArray[0, {Length[genindex], Length[genindex]}];
>m4 = IdentityMatrix[Length[genindex]];
>Au1 = ArrayFlatten[{{m1}, {m2}, {m3, m4}}];
I am going to guess the result you are looking for is the output
that results from
ArrayFlatten[{{m3,m3},{m3,m3},{m3,m3},{m3,m4}}]
|
9/5/2010 9:28:29 AM
|
0
|
Bill Rowe <readn...@sbcglobal.net>
|
Re: Please help
On 4 Sep 2010, at 10:00, olfa wrote:
> Hi Mathematica Community,
>
> Is Mathematica able to detect(recognize) implication between equations?
>
> Thank you.
>
Your question is not clear enough to answer with much confidence but at least Mathematica can do things like these:
Assuming[x^2 + y^2 ==== 1, Refine[x^4 + 2 x^2 y^2 + y^4 ==== 1]]
True
or
Assuming[x^2 + y^2 ==== 1, Refine[x ==== 0 || x^2 + y^2 ==== 1]]
True
etc.
Andrzej Kozlowski
|
9/5/2010 9:28:39 AM
|
0
|
Andrzej Kozlowski <a...@mimuw.edu.pl>
|
NDSolve -- indexing of dependent variable that is arbitrary list
Hello, this is related to my previous question about NDSolve -- n-
body problem. The question is the generalized version of that
question, and hopefully I am expressing the question better ere.
If your dependent variable, y[t] (for example), has arbitrary list
structure (list of lists of lists..), how can you set up an equation
such as
y''[t] = f(y[t])
where f(y[t]) is any arbitrary function of the elements of y[t]?
The simple examples provided in the documentation only show cases of
f(y[t]) that use vector or matrix operations that operate on y[t] as a
whole without e
|
9/5/2010 9:28:50 AM
|
1
|
Greylander <greylan...@gmail.com>
|