4
votes
1answer
131 views

Pre and Post in a Block[]

Why does Block[{$Pre = ( 1 + #) &}, 1] produce 1 while ...
2
votes
1answer
285 views

Speed up iterated manipulations of a graph / table

I am trying to generate a version of Watts' model of cascading shocks to a network following the discussion on p. 20-25 of this article. The basic premise is to use the ...
10
votes
2answers
285 views

Approaches For Creating Cycle Plots in Mathematica

I am trying to create a cycle plot in Mathematica, and I am having a hard time finding the right approach to create the visualization. Can anyone give me a few pointers as to how to approach the ...
6
votes
1answer
396 views

Using “Raw MathLink Connections” to create a “Kernel Object”

Mathematica 8.0.0: I am stuck trying to get a Mathematica Mathlink connection from my Windows computer working that should connects to Linux over network (or vice versa) and then launches a Kernel on ...
0
votes
1answer
424 views

How to create function that classifies sample data

I want to create expression, that classifies samples ( 4 weather features -> decision). Example training data: For the values that i have data for, I can use rules: ...
10
votes
2answers
1k views

Coloring each face of a Cuboid with a different color

Is there a way to color each face of a Cuboid with a different color? I looked in the help but couldn't find anything. I found this Coloring the faces of a 3D ...
15
votes
1answer
1k views

Programmatically combine 2D contour plots with 1D projections

I regularly need to plot 2D and 1D data together. I want to be able to show a 2D contour plot with the projections along each of the axes. As it is now, I create the three plots separately and use ...
12
votes
4answers
1k views

Import[ ] drops leading zeros from data when importing a CSV file

I need to load data from the CSV file shown below. Import[ ] drops the leading zeros in column 3 when it imports the CSV file, but they are security identifiers, and I need them. ReadList[ ] ...
22
votes
2answers
629 views

When to use Get vs Needs

When should I use << vs Needs? I just always use Needs as ...
3
votes
2answers
144 views

Localizing Pattern Names

When I want to define a function that uses a pattern, how should I localize the pattern name (i.e., x_ localizing the symbol x)? ...
7
votes
2answers
249 views

What do AstronomicalData's “SetTime” and “RiseTime” values refer to?

What astronomical event do AstronomicalData's "NextRiseTime", "NextSetTime", ...
9
votes
1answer
261 views

How do I determine astronomical transit times?

Mathematica, through the "legacy" Scientific Astronomer package, used to have the ability to easily determine accurate transit times of astronomical objects simply, with ...
3
votes
1answer
205 views

One Integral — Two Results

I compared Mathematica's default integral evaluation to what you get by computing the indefinite integral and then plugging in the limits. (I did this because the latter approach was much faster for ...
5
votes
2answers
360 views

Why is an integer not considered as a real?

Please consider the following: zeros={0.,0}; data={1, 0., 0}; DeleteCases[data, #]&/@zeros Head/@zeros (*{Real, Integer}*) (*{{1, 0}, {1, 0.}}*) For my ...
4
votes
2answers
2k views

Combining manipulated plots

Let's say I have two manipulated plots: Manipulate[Plot[Sin[a x], {x, 0, Pi}], {a, 0, 10}] Manipulate[Plot[Cos[b x], {x, 0, Pi}], {b, 0, 10}] How can I create a ...
9
votes
1answer
292 views

Is there a way to convert mathematica code to OpenMP or OpenACC?

I see that Mathematica has limited support for things like OpenCL and CUDA, but what about other standards like OpenMP or OpenACC?
16
votes
2answers
727 views

How can I speed up the classic GA for graph coloring?

I'm trying to compute the chromatic number of this graph (which is 28): g = Import@"http://www.info.univ-angers.fr/pub/porumbel/graphs/dsjc250.5.col"; My genetic ...
13
votes
1answer
338 views

What is the complete list of valid FrontEnd Packet types?

In response to my question How can I get the unchanged Box form of an arbitrary expression? John Fultz answered with a method using the hilariously named ...
6
votes
1answer
379 views

Automatically expanding sliders in Manipulate

Is there some way to have all sliders expanded by default in a Manipulator object, i.e. as if I had clicked all "+" signs?
5
votes
1answer
239 views

Reading Early Version Notebooks

I have some very old Mathematica notebooks file (.m) files from Version 2. When I try to open them using Mathematica 8.0 (on a Linux system) Mathematica instantly shuts down (no error message - just ...
5
votes
1answer
148 views

lists of conditions

I have got coordinates in two list of Latitude and Longitude and would like to check if those coordinates are in a certain grid Example lists are: ...
7
votes
3answers
269 views

Wrapping EventHandler by Table

I am making a grid on the screen. The grid is composed of different expressions. I want all of them to have a Gray background, which turns into a ...
1
vote
1answer
269 views

Problem setting up edge rendering function

I have a graph, and I want my EdgeRenderingFunction to colour the edges based on the vertex they originate from. In this toy example, I'm trying to get the edge ...
20
votes
6answers
2k views

How to speed up the function DelaunayTriangulation?

First define a function meshGrid to generate some points: ...
6
votes
3answers
1k views

Transform a Sum into a List

I want to turn a sum like this sum =a-b+c+d Into a List like this: sumToList[sum]={a,-b,c,d} How can I achieve this?
2
votes
2answers
1k views

Why doesn't Mathematica solve $x=\cos\,x$ properly? [duplicate]

Why doesn't Mathematica solve x == Cos[x] properly? Both Solve and NSolve fail with the ...
7
votes
3answers
390 views

Composition of mappings not working as expected

I have two functions $f,g:\mathbb{R}^2 \to \mathbb{R}^2$ and I define a third one $h:\mathbb{R}^2 \to \mathbb{R}^2$ as the composition $$h(x,y) = g(f(x,y))$$ I'm trying to get this function into ...
7
votes
3answers
740 views

How to solve an eigensystem faster?

I have a module that I need to call 1-10 million times in my program. Currently, it is taking several hours to run so I am hoping that I can cut down some runtime with your help. ...
4
votes
2answers
289 views

How can I use Max[] in a function that is passed a list not find the max of the list

For most functions in Mathematica, passing them a list will call the function on each element of the list. For example: ...
0
votes
1answer
227 views

How can I remove orange-box around the Graphics3D?

I don't know whether this is a correct question or not, but I played from two days on this problem and still I didn't find a solution. The save button is enabled whenever we have to specify ...
2
votes
1answer
138 views

Randomizing a lab

I teach a class where students do a weekly lab in Mathematica. They do it in a computer lab, and because there are many of them, and only one of me, I encourage them to help one another. ...
3
votes
0answers
174 views

Insert EndNote citation in Mac OS

I'm trying to insert citations in a notebook. I found a thread that goes back to 2010 saying that the Endnote plugin for Mathematica is not supported on Mac OS. Does anyone know whether this is still ...
3
votes
0answers
43 views

Annoyance: Plot Markers disappear when ListPlot options are set in SetOptions instead of in ListPlot [duplicate]

Possible Duplicate: Why does ListPlot ignore some global options? Using this data: ...
1
vote
2answers
90 views

Using non-Graphics primitives when exporting to .cdf

I'm trying to embed a "Manipulate" applet I've created into a webpage by embedding a .cdf. I'm running into a problem with displaying outputs from functions I've written. Here is a simpler example ...
5
votes
4answers
2k views

How to solve this logarithmic equation?

The equation $$x^2\cdot\log_2\dfrac{3+x}{10}-x^2\cdot\log_{\frac{1}{2}}(2 + 3x)=x^2 - 4+2\cdot\log_{\sqrt{2}}\dfrac{3x^2+11x+6}{10}$$ has two solutions for x, namely 1 and 2. I tried ...
10
votes
2answers
385 views

Grid - problem with ItemSize being ignored

Bug introduced in 7.0 or earlier and persisting through 10.0.2 or later I have run into another problem with Grid today. An explicitly specified ...
10
votes
2answers
2k views

Overlapping accurately Images and Graphics (without loss of resolution)

Context In a previous post, I learned how to produce these kind of plots, which are of interest in astrophysics and geophysics. I am now interested in combining them. Attempt For this purpose, ...
7
votes
1answer
359 views

Exporting Cyrillics in PDF on Linux

I'm using Mathematica from Ubuntu. I need a normal font to display cyrillics inside PDFs. Any default font is very ugly, letters are too close together: ...
4
votes
2answers
402 views

Define product derivative

How do I define the $n$th product derivative of a function in Mathematica? The first product derivative $f^\ast$ of a function $f$ is $$ f^\ast(x)=\exp\left(\frac{f^\prime(x)}{f(x)}\right) $$ The ...
6
votes
2answers
1k views

Singularities using VectorPlot

I am trying to plot a vector function of a fluid flow given by $\vec{V} = (\frac{-\cos(\theta)}{r^2},-\frac{\sin(\theta)}{r^2})$ I am trying to plot it in Mathematica using the command below, I ...
7
votes
2answers
1k views

Memory running out generating ContourPlot3D

The code below ...
8
votes
4answers
632 views

Parametric regions

I'm trying to plot $a x^2 + b x + c$ where $a, b, c$ (and $x$) take on a range of values. I tried ...
16
votes
3answers
912 views

Approximating an ornamental curve

How do I go about approximating this ornamental curve? Note variable thickness typical in calligraphy. Handbook and Atlas of Curves by E.V. Shikin (1995) contains many directions, including curve ...
15
votes
1answer
3k views

Vertically aligning two separate plots

How do I vertically align plots so that the two plots are displayed in a way that lines up with respect to the axes? The code I have so far is: ...
4
votes
2answers
262 views

Vectors in a spherical shell

I have written code that randomly generates a 3D vector of random magnitude. I now want to create a histogram of how many vectors lie in the concentric spherical shells (n*delta r, (n+1)delta r) ...
4
votes
1answer
71 views

WordBoundary issue in StringReplace

Why does the following StringReplace pattern match: ...
39
votes
3answers
2k views

Mollweide maps in Mathematica

Context In my field of research, many people use the following package: healpix (for Hierarchical Equal Area isoLatitude Pixelization) which has been ported to a few different languages (F90, C,C++, ...
3
votes
1answer
329 views

Do “objects” in Mathematica have to be declared?

A while ago I learned a trick which allows one to imitate object-oriented programming in MMA using SubValues: ...
0
votes
3answers
3k views

How do I place frame ticks without having corresponding numbers? [duplicate]

Possible Duplicate: Remove tick labels, but retain tick marks in RegionPlot (and related functions) I need to display a 2D graph, say $y=x^2$ with tick-marks along the $x$ and $y$-axes but ...
3
votes
2answers
744 views

Subspaces in Mathematica

I'm working on a research project and I need to learn how to use Mathematica to calculate subspaces. Specifically I plan to solve the following operations and I would greatly appreciate if you could ...

15 30 50 per page