9
votes
5answers
2k views

How to find rows that have maximum value?

Suppose if I have following list { {10,b,30}, {100,a,40}, {1000,b,10}, {1000,b,70}, {100,b,20}, {10,b,70} } How to find rows that have max value in ...
9
votes
3answers
961 views

Replace expressions with symbols

First of all: I'm new to Mathematica, so I would appreciate it if the answers are quite complete. I have the result of calculation that is expressed in $\sin$ and $\cos$. Now, all of these can be ...
10
votes
2answers
621 views

How to add an interpolating point to InterpolatingFunction?

Suppose I have an InterpolatingFunction object defined on $[\epsilon,1]$; let's call it f. What is the best way to construct a ...
12
votes
2answers
826 views

Representing second derivatives with a double overdot

I would like to express a second derivative with two dots above the variable. You can do this with a first derivative by saying: ...
13
votes
5answers
790 views

Using DynamicModule variables outside the DynamicModule

Take the following example for hiding/showing a notebook through a Checkbox: ...
6
votes
1answer
465 views

How to solve this iteration in the functional programming way?

I am trying to come up with a functional programming method to calculate a list of replacements, that depend on previous replacements. Since there is always a finite number of steps, I would like to ...
10
votes
2answers
217 views

Bags and non-standard evaluation

What can internally be happening here? Is the evaluator just messing with us and going non-standard because it's a Bag? Or am I just not seeing how something like ...
6
votes
4answers
487 views

Why do I see the error “only assignments to symbols are allowed” when using a Module and not otherwise?

When I type Remove["Global`*"] foo[] := Module[{Subscript[a, 1] = "x"}, 0]; foo[] I get the expected error "only assignments to symbols are allowed". I ...
30
votes
4answers
5k views

Simultaneously fitting multiple datasets

What is the proposed approach if one wants to simultaneously fit multiple functions to multiple datasets with shared parameters? As an example consider the following case: We have to measurements of ...
7
votes
3answers
410 views

ListPlot InterpolationOrder->0 datapoint centered

it is possible to get a histogram style in ListPlot using InterpolationOrder->0 ...
11
votes
0answers
365 views

Is it possible to regain Mathematica 5.2's palette input focus behaviour with version 8.0?

Between Mathematica 5.2 and later versions, there has been a change in determining which notebook gets the palette input focus, which leads to quite unfortunate behaviour if you use ...
4
votes
1answer
730 views

MaxSteps and Computing time issue for Solving Differential equation in Mathematica

When we solve differential equation numerically using NDSolve then sometimes we get error like NDSolve::mxst: Maximum steps reached According to Mathematica docs ...
36
votes
2answers
2k views

Is there a way to separate variables between multiple notebooks?

I often correct homework by checking the calculations in Mathematica. Sometimes you would like to have two solutions open at once. However often defined symbols such as ...
23
votes
5answers
10k views

How do I clear all user defined symbols?

Is there some way to do this other than going to Evaluation -> Quit kernel and firing a new one up?
41
votes
2answers
2k views

Internal`Bag inside Compile

Since Internal`Bag, Internal`StuffBag and Internal`BagPart can be compiled down, it is a ...
22
votes
2answers
798 views

Are there any “RLink” like projects, which enable the interaction between R and Mathematica?

I want to borrow the vast amount of packages of R. I know there was one but it is neither sold nor supported anymore. So are there any active open source projects for linking R with Mathematica? Thank ...
55
votes
7answers
2k views

Functional style using lazy lists?

Let's say I want to answer the question "what are the first 400 palindromic prime numbers?" The first approach that comes to my mind from the set of languages that I know is to use some sort of lazy ...
3
votes
1answer
532 views

How to make GraphicsGrid with content tight inside it?

I am trying to use GraphicsGrid to typeset some labels for my plots. I found the labels look little better when I use GrapicsGrid vs Grid. The labels have equations in them and not just plain labels. ...
5
votes
2answers
584 views

Outline Numbering for Mathematica Section/Subsection Cells

I am trying to create a LaTex-style document with Section numbers of the form 1.0 and then subsection numbers 1.1, 2.1, etc. I need the numbering to be automatic such that if I insert a new ...
17
votes
3answers
712 views

Centering date labels over the year in a DateListPlot

The canonical formatting for date labels in a DateListPlot is for the year or other date label to be centered over the tick at the start of the relevant period. ...
34
votes
4answers
3k views

How well does Mathematica code exported to C compare to code directly written for C?

Essentially what it says in the title. Mathematica can, IIRC, export it's code to C. How much overhead does that inflict on the code, as compared to writing it from scratch in C?
9
votes
2answers
581 views

Series expansion of an inverse

I have to find the series expansion of the inverse function of : $\arctan\left(\frac{\ln(1+x)}{1+x}\right)$ How do I find out the series expansion of any inverse ? Note: The inverse of a function ...
9
votes
2answers
596 views

How to create a group action table with Mathematica?

Background: I want to explain the Sylow Theorems as detailed as possible, therefore I am rewriting the proof using concrete examples. Since the answers to my questions ( about Mathematica ) have ...
9
votes
2answers
682 views

Flatten at a certain level

In an earlier question the brainteasing fourth syntax variant of Flatten was discussed. I see that with ...
7
votes
4answers
874 views

Plot Ellipse based on EigenSystem

Please consider the following : ...
17
votes
4answers
646 views

How can I specify the arrowhead size in printers points?

Is there any way to specify the size of an arrowhead in printer's points? I'm looking for something that would have similar functionality to AbsolutePointSize, ...
13
votes
3answers
657 views

How do you programatically load data into symbols?

I am trying to convert a list of string names into symbols, which will then be used to store data. I have 24 files (where the name of each file is a member of the list mentioned above) that I need to ...
9
votes
3answers
493 views

How can I speed up SQL queries in Mathematica?

I have an application that queries a MySQL database many times for data. At the moment, Mathematica and MySQL are running on the same box and yet it takes over 1.6 seconds for the query to run and ...
6
votes
2answers
593 views

Efficient by-element updates to SparseArrays

I have a very large SparseArray called A. What is the most efficient way to update say element ...
17
votes
3answers
2k views

Way to improve “show me this decimal number to M places, don't use scientific notation”?

The best way I can come up with to say "show me this fraction as a decimal number to M places, don't use scientific notation" is: ...
4
votes
2answers
225 views

How to work around Column cutting off a pixel row from images?

I have a problem where Column will occasionally cut off a single pixel from the top of images. To reproduce the problem, evaluate this: ...
10
votes
4answers
480 views

Typography messed up in prints

For a long time now I've had trouble printing Mathematica files. While the .nb itself displays just fine on my screen, the kerning is awful when printed. Screen: Print: And in case you ...
19
votes
2answers
3k views

How to enter matrices in block matrix format?

Example: I have a matrix $R = \left( \begin{array}{cc} A & \mathbf{t} \\ 0 & 1 \end{array} \right) $ where $A$ is 3-by-3 and $\mathbf{t}$ is 3 by 1. Or in Mathematica ...
5
votes
0answers
637 views

Analytical model fitting

I have a special type of model fitting problem that I am trying to solve in Mathematica. Any insight how to attack it using available tools of Mathematica will be great to hear. We have a variable $$ ...
5
votes
3answers
417 views

Tile image on specific location without space between them [duplicate]

Possible Duplicate: How to combine images with the same dimensions in a grid? I would like to arrange images without any space between their edges as each piece is made to connect with ...
15
votes
2answers
2k views

Fontsize is too small

I have this annoyance for a long time now: every Text cell uses the default font size, though it appears too small on my screen. See comparison of same text, same font (Times New Roman), same fontsize ...
7
votes
2answers
280 views

Revert FullForm-ed text to prettyprinted

Sometimes strings in a notebook/package file end up garbled due to some unknown/unintentional conversion of the expression/cell/notebook. I could not find a way to revert such unreadable text to its ...
59
votes
5answers
10k views

$\LaTeX$ and Mathematica

I quite often would like to draw graphics in my $\LaTeX$ documents using Mathematica. I have encountered three problems. I would like to know if there are any workarounds to these problems I would ...
35
votes
8answers
7k views

What is the best Mathematica tutorial for young people?

As Conrad Wolfram said at the TED conference, in the future kids should focus more on new technology. Computers compute better than humans, so we should focus more on thinking and getting the ...
6
votes
2answers
434 views

Visualizing 3x3 spectrahedra

I'm trying to visualize the SDP cone over 3x3 matrices by plotting random 3d sections of it. Since each region is a system of inequality constraints, I'm using RegionPlot, but I think the plots would ...
6
votes
3answers
170 views

Does there exist any way to add type annotations?

Is there any way to add my own annotations to values or functions in Mathematica? Imagine, for example, that I wanted to annotate a List specifically as a ...
7
votes
1answer
600 views

Using Mathematica to help to determine the consistency of and numerically solve systems of non-linear equations

The formal problem The question I am about to ask is applicable to many scientific and engineering problems. In short, I am bout to ask for pointers and practical advice for Mathematica beginners who ...
12
votes
3answers
426 views

With versus Function

I've seen people compare Block with Module and With as scoping constructs, and try to figure ...
45
votes
6answers
2k views

Functions vs. patterns

Every time I define a new function, I wonder which construct I should use: true functions obtained by using Function, or rule-based syntax. For example, these are ...
7
votes
2answers
379 views

Ideas on how to improve the rendering of the letter B in this 3D region plot?

I have been playing with the RegionPlot3D idea from this question and have been trying to approximate the Gödel, Escher, Bach logo, but I am a little bit stuck on how to improve the rendering of the ...
13
votes
3answers
357 views

What is the purpose of tags like :Name:, :Context:, etc. in packages?

I noticed that all of the packages that come with Mathematica start with a header that is in a standard format. (See e.g. the header of NIntegrateUtilities` at the ...
14
votes
3answers
2k views

I'd like to display field lines for a point charge in 3 dimensions

I'd like to display field lines for a point charge in 3 dimensions. Not a force field (short arrows) but continuous field lines that start on the charge.
6
votes
3answers
302 views

How to eliminate the need to double evaluate a Manipulate so that a Module in its Initialization section works?

Using V 8.04 on windows. I think this issue might be related to the fact that Mathematica reads main body the Manipulate before evaluating or running the Initialization option. Or, might be ...
18
votes
3answers
4k views

How to Keep Input Cells Hidden After Evaluating Notebook

I've created a notebook for use in an in-class presentation. There is a fair amount of MMA code, and my students know nothing about MMA nor do they need to. I don't want to distract them with the ...
7
votes
1answer
380 views

Using NETLink.MathKernel.Compute() for graphics results fails with GraphPlot[]

I'm using MMA 8.0 to provide backend on a .NET application I'm writing. I am trying to use the high-level Wolfram.NETLink.MathKernel interface to export an image ...

15 30 50 per page