2
votes
2answers
43 views

How to replace a variable that was assigned a value before

Question How to make the replacement $f[x] \to f[y]$ for an abitrary function $f$ if $x$ was assigned a value before? Example 1 How can I make the replacement $x +1 \to y + 1$ if I have assigned ...
2
votes
0answers
93 views
+50

Caching of Graph Graphics

In this answer, Simon Woods concludes that when you display an expression with head graph more than once, something is getting stored somewhere. I looked into it too and found out this only happens if ...
1
vote
1answer
68 views

How to make the plot from geotiff format

I have a "GeoTIFF" format map, and I have imported it into Mathematica, then I used the Graphics to plot a point on the map. ...
4
votes
4answers
82 views

A simple StringCases problem

Given this text: text1 = " A Vitamin D Deficiency (ICD-9-CM 268.9) (ICD-9-CM 268.9) 09/11/2015 01 "; Yes, the ICD code values are duplicates- possibly but ...
0
votes
0answers
18 views

Create/Plot Tables of sequences and partial sums

How exactly do you create and plot tables of sequences and partial sums?
0
votes
1answer
28 views

Using NonlinearModelFit to fit data with errors

Assume we have some data of measurements SeedRandom[9]; data = Table[{i,2*(1 + 5*RandomReal[])*Exp[-0.01*(1 + RandomReal[])*i]}, {i, {0, 100, 200, 400, 700}}]; ...
15
votes
3answers
234 views

How can I detect an ellipse in a photo?

I tried to detect the rim of the following cup as an ellipse. I've tried the solutions given in How to find circular objects in an image? to detect the ellipse, but the detection result was not ...
1
vote
3answers
115 views

The plot of roots of polynomials

I have polynomial equation like Tribonacci Polynomials for example: $T_3(x)=x^4+x$. After finding the roots of this polynomial, I want to show these roots in the complex plane. I have tried lots of ...
18
votes
7answers
538 views

How do I get my equation to have the form $(x-a)^2 + (y-b)^2 + (z-c)^2-d = 0$?

I want Mathematica to express the equation $$-11 - 2 x + x^2 - 4 y + y^2 - 6 z + z^2=0$$ in the form $$(x - 1)^2 + (y - 2)^2 + (z - 3)^2 - 25=0$$ How do I tell Mathematica to do that?
2
votes
0answers
26 views
6
votes
1answer
77 views

Telling mathematica to output * instead of space for multiplication, so I can copy as plain text

I am trying to get some symbolic expressions in Mathematica which I would like to paste into my C/MATLAB codes. This can be accomplished nicely by selecting the expression and right-clicking to ...
4
votes
1answer
29 views

Combine absolute and relative (scaled) coordinates

I am using Inset to add an Epilog to a plot. The position of the images (in my case: framed numbers) can be specified as an ...
2
votes
4answers
47 views

Filling and Shading an Harmonic Curve

Suppose I have an equation plotted as shown: ...
4
votes
1answer
21 views

How to relate memory usage with occupied positions of SparseArrays?

What is the relation of memory usage of a SparseArray and the number of its occupied positions? Let's say you build a 100.000.000 by 10 element SparseArray. And fill the two position 1/1 and ...
18
votes
4answers
531 views

What is the complete list of valid Front End Tokens?

What is the complete list of valid Front End Tokens? Preferably, by version number.
3
votes
1answer
103 views

Filtering the elements of an array to split them into two categories

So, I am new to Mathematica, and I am trying to write something that involves taking values from one array and separating them into two different arrays. My code for doing this is: ...
4
votes
0answers
32 views

Faster way to perform SameQ[Reduce[…], Reduce[…]]

I'm have some expressions that I need to confirm the equality of. SameQ[Reduce[...], Reduce[...]] works like a charm for the more simple expressions, however when ...
2
votes
1answer
90 views

How to draw tiles with different height?

I have a random matrix RandomReal[{1, 2}, {20, 20}], whose elements represent the heights of an array of tiles. The cross sections of each tile are square and ...
9
votes
1answer
90 views

Cell brackets on left side?

Is it possible to have the cell brackets on the left? I looked through the options and couldn't find anything, but maybe it's some kind of esoteric style setting or something. The reason I'm looking ...
3
votes
1answer
96 views

Manipulate a Plot that contains a variable that contains symbol

This snippet mm = m Manipulate[{mm, Plot[mm x, {x, 0, 1}]}, {m, 0, 1}] (m is not defined anywhere) produces a sadly fixed ...
0
votes
0answers
33 views

Interpolation and points of non-differentiability

I have some data, which if expressed by some elementary functions, would contain a non-differentiable point. I would like to be able to use something like interpolate to convert the data into a ...
6
votes
1answer
42 views

Correct behavior of lock file in hsqldb connection

I'm running in to some problems with generating a persistent HSQLDB and during some troubleshooting I came upon the following behavior. ...
1
vote
0answers
77 views

Precision of a complex number

In an output I'm getting a number like -0.33998187034939803 + 0.I. Finding ...
2
votes
1answer
47 views

Optimizing functions taking matrix arguments

I'm looking for general information on how to optimize matrix valued functions, I have the following function I'm looking to maximize (or figure out if this is possible at all). ...
4
votes
2answers
105 views

How to draw a contour diagram in Mathematica?

This answer at Math.SE contains a neat contour diagram created using Mathematica: What Mathematica functions I can use to draw diagrams like this?
6
votes
2answers
134 views

Dynamic graph visualisation using JLink/Java and GraphStream

Visualising the addition of new nodes and edges to a graph to 'watch it grow' is to something Mathematica is not suited to by default. However this type of animation really helps convey the emergence ...
10
votes
1answer
1k views

Is it possible to export the equations from Mathematica to MATLAB?

Is it possible to export the output expressions from Mathematica computations (e.g., equations) in valid MATLAB syntax?
1
vote
1answer
55 views

Manipulating plot of random iterated function system fractal

I'm generating the Sierpinski Gasket by implementing a chaos game in mathematica. What I'd like to do is create an interactive manipulation with a slider, whereby moving it forward, plots all the ...
1
vote
0answers
50 views

FindRoot runs out of memory in Windows but not on Mac

I am using FindRoot to find solutions to a large, highly oscillatory equation which I generated using other code. When I run ...
7
votes
0answers
54 views

Performance of Dispatch and lists of Rules

First of all, I have seen the question "Why is this parallel evaluation with Dispatch[] so slow?", but that seems to be a different matter. My question arose when I tried to answer this question by ...
3
votes
1answer
48 views

Question about usage of Style as Dynamic object

I saw a Dynamic snippet in this answer, which wrote ...
61
votes
14answers
2k views

What are the most common pitfalls awaiting new users?

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...
1
vote
1answer
59 views

Weird vertical line when trying to plot a histogram [duplicate]

I'm trying to plot a histogram of a few data points and overlay a plot on it (it's a fit of a geometric distribution to my data). The weird thing is that a vertical line appears always next to the ...
0
votes
0answers
43 views

Question regarding function definition overloading / argument passing test [duplicate]

It is possible to define function dependently to passed argument type or condition this argument fulfills (somewhat like overloading): ...
17
votes
2answers
220 views

Why is there no PositionFunction in Mathematica?

Too often I have seen the programs of inexperienced users greatly slowed by using Position in an iterative fashion, when far faster would have been to compute a ...
0
votes
2answers
99 views

creating an API or Widget based on a Mathematica notebook

I'm trying to create matrix calculator and graph tools for our website and was wondering if there is a way to create Wolfram API or Widgets based on a Mathematica notebook.
3
votes
1answer
59 views

undisputed FrontEndTokenExecute

Thanks to that great topic, I've found FrontEndToken i was looking for: "DeleteGeneratedCells". Well it is also written in ...
3
votes
1answer
45 views
6
votes
1answer
62 views

create function that behaves like continuedFraction [duplicate]

I'm just starting to learn Mathematica and I got stuck at this question. This a noob question but please help. I need to define a function named continuedFraction that takes user input of type list ...
8
votes
5answers
296 views

Building a continued fraction

I've completed a problem that involves approximating $e$ by a continued fraction: $$\frac{N_1}{D_1+\frac{N_2}{D_2+\frac{N_3}{\ddots+\frac{N_k}{D_k}}}}$$ with the $N_i$ being the list ...
2
votes
1answer
257 views

non-linear trend reduction using thresholds

Doing some mappings of the earth magnetic field results in the left-hand figure below (which consists of 181 profiles): To improve this I tried a non-linear trend reduction using, for example, ...
192
votes
10answers
22k views

Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
5
votes
3answers
147 views

Problem with extracting specific contour from a ContourPlot

I am trying to exctract contours of specific value (2.6*10^-6) out of a ContourPlot and measure their area. Below you can see the code. It is noticable that not all of the relevant contours showed in ...
0
votes
0answers
21 views

How do I automatically “trim” the bounding box for a Graphics3D output? [duplicate]

I noticed that, provided some Graphics3D output scaled with ImageSize, I can get rid of a lot of the empty space around the graphic by right-clicking and then selecting "Trim Bounding Box". Thinking ...
-1
votes
1answer
84 views

How to insert big list of Data in DB?

I have a list of values with length is 60000.Earlier I used this list in my App by using ...
3
votes
1answer
237 views

How to asynchronously download 100000 urls in an efficient way

URLSaveAsynchronous can download one url page, how to download 100000 urls in an efficient way? And better to with an whole progress bar. I've downloaded 90000 ...
1
vote
2answers
128 views

extracting the rows of a matrix satisfying a condition (e.g. all elements negative)

I have a matrix with thousands of rows and want the submatrix comprising the rows of the original matrix that have, e.g. a negative element in column 3. How to do that?
2
votes
1answer
55 views

How to keep ItemSize effect when export to HTML

Here's the simple code Grid[Table[Item[1,ItemSize->{5,10}],{2},{2}],ItemSize->{5,10},Background->Red] Save the output cell as .html file, ...
7
votes
2answers
1k views

Creating a simulation of our Solar System

As the title says, my objective is to create a simulation of the motion of the planets in our Solar System using Mathematica. All the theoretical background regarding the equations of motion of ...
-2
votes
0answers
61 views

How to use older code in the latest release [closed]

I have some notebook files developed with an earlier version of Mathematica, but I encounter a lot of errors when running the program in version 9. The errors are as follows: ...

15 30 50 per page
1 2 3 4 5 156