All Questions

3
votes
1answer
496 views

How can Mathematica be used to detect an area surrounded by the most lines?

I have an array of lines that produce random shapes. These lines define edge boundaries from an array that I would like to use to reconstruct the main feature of the array. Can Mathematica find the ...
5
votes
1answer
730 views

Time approximation of decrypting RSA algorithm

I've written a function that encrypts a text using the RSA algorithm. It then decrypts it using prime factorization, and takes the time it took to decrypt it and puts it in a vector together with the ...
23
votes
2answers
1k views

How to retrieve the parameters calculated and used by ImageAdjust?

When ImageAdjust is called with an image, i.e. with one parameter, it returns an automatically adjusted Image. I would like to ...
11
votes
4answers
3k views

Filling between two 3D surfaces

I know it is possible to create a filling in between two curves on a 2D plot, but is it possible to do the same in 3D? My attempt like this: ...
4
votes
1answer
283 views

Cannot calculate with Dynamic variables in a grid

This is a prototype of a grading scheme. In reality it is bigger. The 10 pts in initPtsPartA comes from the school. The output cell should be deployed as a CDF ...
4
votes
2answers
768 views

Export grayscale png

The help for the Export function is absolutely unclear. How can I specify options for my output format? According to the documentation, PNG supports grayscale ...
7
votes
2answers
1k views

How can I convert a formatted text cell to latex code?

I have a formatted text cell, I want to export it as latex. How can I do that? Since copy as LaTeX doesn't work, I thought of pasting it into a string and exporting, but it's a no go: ...
0
votes
1answer
693 views

How to collect terms of a given type (with subscript and power) in an expression?

Suppose that I have an expression: ...
5
votes
2answers
282 views

Force size in pixels of plot area excluding axes and labels

I have a matrix where each element represents a pixel. I want to plot the matrix (possibly with ArrayPlot). To suppress aliasing in the final graphic (which I will ...
8
votes
2answers
744 views
12
votes
2answers
790 views

Automatizing PSfrag export

I'm in the early phase of creating a Mathematica function (or package) that exports graphics such that they can be used with $\LaTeX$'s PSfrag. The goal Ideally, the function should take a graphic ...
1
vote
1answer
147 views

“Hiding” cells until the first cell is evaluated

This question is based on my earlier question about randomizing labs for students in my computer lab courses. There a perfectly good solution was posted; however, because of privilege problems, I ...
5
votes
1answer
653 views

Forget past outputs to free memory [duplicate]

While tinkering with a notebook that loads a large chunk of data in memory, I noticed that if I run it multiple times, the past chunks reside in memory. I understand that the reason (or one of) for ...
10
votes
1answer
2k views

Sparse convolution of sparse arrays

The documentation for ListConvolve mentions that "ListConvolve works with sparse arrays", which is true. The result, however is never sparse, eg: ...
15
votes
4answers
4k views

How do I find the degree of a multivariable polynomial automatically?

I have a very simple question which appears not to have already been answered on this forum. Is there built-in functionality that returns the degree of a multivariable polynomial? For example if the ...
1
vote
0answers
264 views

Parallel linear algebra with arbitrary precision

Is it possible to do parallel linear algebra with arbitrary precision within Mathematica (in a simple manner, as is done for the machine precision)?
6
votes
2answers
683 views

Optimize inner loops

I'm Mathematica newbie so please be gentle :) I have this, heavily non-optimized part of code, which I would like to speed up. I have put all matrices to be RandomReal, but in my code they take ...
7
votes
3answers
153 views

How can I know if a pattern corresponds to a string pattern?

What would be the best way to detect if a pattern corresponds to a string pattern ? An invalid string pattern p would lead to an error in ...
4
votes
1answer
327 views

Performance of a Do-Loop of variable length

If I'm changing a basis depending on a (non quadratic) matrix $\mathbf{M}\in\mathbb Z^{d\times k}$ and some $\mu\in\mathbb N^k$, i.e. i have an array a of the same ...
1
vote
2answers
724 views

Add values to a PlotLabel; use text characters for PlotMarkers in DiscretePlot3D

I have a plot like this: Table[Plot[a*x^2/4, {x, 0, 5}, PlotLabel -> "a=" a], {a, 1, 5, 1}] I want to label the plots as ...
6
votes
1answer
364 views

Exported graphics texture to eps is too dark

Why is the exported graphics eps file so dark? It looks much lighter (and better) as the Mathematica output appearing the notebook. After running ...
7
votes
4answers
783 views

How to batch rename a directory of files?

I have a directory of files with the pattern: "some_number.some_name.pdf" I want to remove the "some_number." part from all the ...
2
votes
1answer
424 views

Restrict SystemDialogInput to open certain file types

The documentation for SystemDialogInput shows how to restrict the types of files shown. SystemDialogInput["FileOpen",".nb"] .....
2
votes
0answers
484 views

Coulomb/kepler potential dynamics. NDSolve breaks

I've been trying to do a simple dynamics in coulomb potential (electron(s) around a nucleus). My equations break down. I think it's because of 1/0. is there a way ...
8
votes
2answers
196 views

Projecting Reference Lines in a SmoothHistogram3d Surface

What is the best way to draw a path (red color, dashed) along the surface of the smoothHistogram3D. Assume the paths desired to be the X=0 and Y=0 Axes. ...
10
votes
2answers
334 views

Mathematica Typing Effect

Here is a Typing Effect in javascript. I could only implement a very simple one: ...
4
votes
2answers
239 views

Error in Compiled function at runtime in spatial competition model

I just did a model of spatial competition between two species with different competitive ability & dispersal rates on a lattice with variables nrs of individuals per site. To speed it up I tried ...
1
vote
2answers
961 views

Specifying parts from lists for plotting using Show

I have the following data: ...
2
votes
0answers
621 views

Generating a function which outputs possible chemical reactions

I want to make a list of chemical reactions and I write them down in a $\require{mhchem}\LaTeX$ format. They are of the following form $$NA_n^i+MB_m^j \rightarrow \hat NA_{\hat n}^{\hat i}+\hat MA_{\...
2
votes
2answers
450 views

Histogram of runs

What I would like to do is generate a histogram of the consecutive time spent under a level. For example if the level I was interested in was 1.0 and I had this data; ...
8
votes
1answer
163 views

Exporting Graphics3D is not complete

Bug fixed in 9.0.1 When I export the result defined as the variable pot1 to pdf, the lower contour plot isn't showing. How do I fix this? ...
1
vote
2answers
307 views

Doing an Interpolation through a list of lists into a single function

Suppose I have a list of lists, i.e. list = Table[{x, x^ k}, {k, 1, 10}, {x, 0, 1, 0.05}]; and I want to interpolate each of the lists by a function using ...
3
votes
1answer
2k views

How do I cut down on file size of exported eps without losing quality?

I need to import the following to eps so that I can put it into my TeX file. The problem is two-fold: the exported file looks terrible (unlike the Mathematica output), and secondly, the file size is ...
68
votes
4answers
13k views

Placing a ContourPlot under a Plot3D

I would like to combine a 3-dimensional graph of a function with its 2-dimensional contour-plot underneath it in a professional way. But I have no idea how to start. I have a three of these I would ...
7
votes
2answers
2k views

Possible to evaluate only selected cells?

Is it possible to evaluate only the selected cells programmatically that I am interested in? Say in current cell to bottom of the notebook, instead of evaluate notebook or cells?
13
votes
2answers
2k views

Rasterizing a plot make axes ticks invisible [duplicate]

I've evaluated this code: plot = Plot[x, {x, 0, 10}]; g = Rasterize[plot, ImageResolution -> 300]; Everything looks good except the ticks (on the axes); they ...
26
votes
0answers
1k views

Kinect on Mathematica

I saw on the internet a lot of nice experiments with Microsoft Kinect. I just bought one and would like to know if someone here has been able to use it with Mathematica. The main idea is to been able ...
7
votes
3answers
633 views

Locators in Manipulate not moving properly

I thought a simple Mathematica kerning machine (for adjusting the space between characters) would be interesting, but I'm having trouble with the locators. (There are a number of other questions ...
0
votes
0answers
79 views

How to obtain xyz-axes of same length? [duplicate]

Possible Duplicate: Controlling the 2D $x–y$ aspect ratio of a 3D plot I am plotting 1000 points in a 3-dimensional cartesian coordinate system, the plotting range for the x, y, z axes is set to {...
3
votes
2answers
801 views

Numerically finding a derivative jump of a function

How would I numerically find where a function has derivative jumps? In particular, I'm working with this function: ...
1
vote
2answers
252 views

Error changing edge thickness in a GraphPlot

I'm having some problems with the Mathematica graphics inspector. I want to make a graph with the following code: ...
5
votes
2answers
1k views

Color mixing or blend

Color mixing seems not only one type. Here is RGB_color_model I wrote this one: ...
2
votes
1answer
274 views

Adjusting Stylesheet Output Format

I'm using one of Mathematica's built-in stylesheets, "Standard Report". When I enter an expression into an input cell and evaluate it, the input is shown with a white background, while the output has ...
2
votes
2answers
826 views

plotting evolution of points in the same plot

I am trying to plot the points (i,j,k) as they are generated in the loop but in the same plot. The next draws the points in different windows. ...
9
votes
1answer
818 views

Wrapping a rectangle to form a cylinder

I'd like to make an animation showing how we wrap a rectangle to form a cylinder (by joining a pair of parallel sides). Here's my first pass: ...
1
vote
3answers
3k views

Tricks for solving (lots of) coupled nonlinear equations numerically?

I have a system of 6 non-linear (quadratic) coupled equations with 6 complex unknowns \begin{align*} |x_1|^2 + |x_2|^2 + |x_3|^2 &= a\\ x_1 x_4^* + x_3 x_5^* &= b + c i\\ x_1 x_6^*...
12
votes
2answers
1k views

Finding the Centroid of the grid

Im trying to automate the processing of my shooting targets to measure my performance in the range. I was able to process the shots, but I still have to select the center of the target by the use of ...
16
votes
4answers
3k views

Moving the location of the branch cut in Mathematica

According to the documentation, Mathematica chooses the branch cut for $\log(z)$ to lie along the negative real axis. It it possible to change this so that it lies along the positive axis or elsewhere ...
4
votes
1answer
199 views

Strange behavior of DateList when converting string

DateList experiences some strange behavior which i cannot explain. This code works fine: ...
0
votes
1answer
1k views

Assign the result of Solve in a list [duplicate]

Possible Duplicate: Assign the results from a Solve to variable(s) I want to assign the results of a Solve command in a list. For example Solve[-((287 s^3)/50) == 0, s] returns {{s -> 0}, {s -> 0}...

15 30 50 per page