All Questions

20
votes
5answers
1k views

Op-art Graphic Images

This image comes from Michael Trott's Mathematica Guidebook for Programming. It's just a chapter image though, and he doesn't show the code. I was wondering what would be the best approach to ...
12
votes
1answer
228 views

Is there a way to get AbsoluteTime to correctly report absolute time differences?

Absolute time supposedly reports the "total number of seconds" between two dates, but it does not. For example because of the leap second applied at 2012-06-30T23:59:60Z ...
3
votes
0answers
254 views

Parallel PowerMod

Is there anyway to parallelize the PowerMod function? Here is my Left-To-Right modular exponentation: ...
9
votes
3answers
675 views

How can I type left (sub)superscript?

I want to type in my variable next to its plot and I'm typing the text in using Inset. However my variable has superscripts to the left. Say it looks like this: $ ...
11
votes
2answers
1k views

Finding distribution parameters of a gaussian mixture distribution

Short version: how to estimate the parameters of a mixture of multivariate normal distributions (i.e.: Gaussian mixture model)? Long version. I am trying to estimate the parameters of a mixture of ...
4
votes
2answers
1k views

Reading in scientific notation from C++ to Mathematica

With a text file with entries formatted as (output from C++): f[38.67] = -2.5387862698183892298317350539374412777263289550697e-05; ⋮ Is there a way to read this ...
17
votes
4answers
2k views

How to draw Fractal images of iteration functions on the Riemann sphere?

Prof. McClure, in the work "M. McClure, Newton's method for complex polynomials. A preprint version of a “Mathematical graphics” column from Mathematica in Education and Research, pp. 1–15 (2006)", ...
0
votes
0answers
69 views

Export expression to Matlab [duplicate]

Possible Duplicate: Is it possible to export the equations from Mathematica to MATLAB? I like to export a Mathematica expression like.... ...
1
vote
1answer
227 views

Problem with function as an argument

I want to write a function like the following: s[u_, v_, x_, val_] := u[val]/NIntegrate[u'[x] v[x] + u'[x] v'[x], {x, 0, 1}] So I can evaluate something like ...
4
votes
0answers
218 views

Notebook manipulation to “Save as (HTML)”

In a previous question, I said that I wanted to display code as text in "Save as (HTML)". I am closer, but would like to ask the community for a better approach by telling the whole picture. I did my ...
11
votes
5answers
254 views

Construct an infix operation from a list

Inspired by this question, if I have a list {a, p, b, q, c} where p and q are binary ...
6
votes
2answers
135 views

Prevent front-end from reformatting long fractions while editing

I am editing an expression containing wide fractions (typeset with fraction boxes): But if, while editing the equation, the fraction exceeds some threshold (seems to be approximately the window ...
2
votes
3answers
154 views

Mathematica Basic Plotting Question

Is it possible to plot y = x^2 and x = y^2 on the some graph? For some reason, I can't get it to plot the ...
12
votes
3answers
3k views

Multivariable Taylor expansion does not work as expected

The basic multivariable Taylor expansion formula around a point is as follows: $$ f(\mathbf r + \mathbf a) = f(\mathbf r) + (\mathbf a \cdot \nabla )f(\mathbf r) + \frac{1}{2!}(\mathbf a \cdot ...
15
votes
6answers
1k views

Insert $+$, $-$, $\times$, $/$, $($, $)$ into $123456789$ to make it equal to $100$

Looks like a question for pupils, right? In fact if the available math symbol is limited to $+$, $-$, $\times$, $/$ then it's easy to solve: ...
1
vote
1answer
226 views

Export image data precision

I'm sure there is a very easy way to control this, but I have been searching for an hour now without luck. I plot a function and export it to get a table that I can use in TikZ. ...
1
vote
1answer
343 views

How to plot X and Y data to see average data converging?

I initially have ran a large, say 1000 (to be changed later) number of monte carlo simulations (mcRun), and I want to see when the average data result starts to converge to a reasonable value. So I ...
9
votes
2answers
794 views

Dashed line with alternating colored dashes

I am doing a plot where I have multiple shaded regions, and I want the line that separates the two regions to be dashed with dashes being alternating colors (so the demarcation stands out from both ...
1
vote
1answer
153 views

Optimization of correlation calculation

How can I make the following line of code run faster? Is there a way to do this calculation as a matrix vs vector than vector vs vector? In the code below, f is a ...
0
votes
2answers
468 views

Why Can't Mathematica Integrate this?

I have the following problem from a textbook I am trying to integrate: So, following the directions in text, I am required to integrate each function. However, I cannot get Mathematica to integrate ...
2
votes
2answers
227 views

How to create InterpolatingFunction from data?

If I have a function at a number of non-uniformly spaced data points: youtReal[7.8]=2.0332;, youtReal[8.54]=6.24352354;.................. ......... and the ...
4
votes
0answers
237 views

Why does OS X need permission to allow JLink connections each time it starts?

I understand that JLink loads each time Mathematica launches or each time a kernel starts, and that this can require permission from the firewall, if it is enabled but OS X provides settings the ...
3
votes
1answer
224 views

generating pdf using UseFrontEnd

I run mathematica on a remote server and run it in batch mode using /math -noprompt -script 'scriptname.m' & Now, I use ssh -X to connect to the server. The server is linux based and my computer ...
5
votes
2answers
455 views

Replacements/Substitutions in Mathematica

I am a new user of Mathematica and have some questions about the simplifications of calculated expressions. I am unable to attach an image of the session, but my Mathematica commands are: ...
2
votes
0answers
676 views

Automatically sending to Print (using CutePDF Writer)

I use CutePDF for creating PDF output, but this requires manually selecting Print (Ctrl+P), with CutePDF Writer as the printer, and pressing OK. Can this be automated?
5
votes
1answer
369 views

Setting default Mathematica version

Is there a way to set the default Mathematica version? I would like to run both versions 7 and 8 (on a Win7 PC), but when version 8 is installed it takes priority. Clicking on a notebook ...
2
votes
1answer
215 views

Problem creating MeanPredictionBands

I have a problem creating MeanPredictionBands for my function which I fitted using NonlinearModelFit. I have a complex-valued ...
7
votes
2answers
800 views

Import Fortran unformatted binary

I have an unformatted binary file generated using the Compaq Visual Fortran compiler (big endian). Here's what the little bit of documentation states about it: The binary file is written in a ...
10
votes
2answers
2k views

Machine learning. SVM algorithm

I want to work with machine learning in Mathematica. Are there any SVM algorithms implemented in Mathematica anywhere? Or any other algorithms for machine learning? With positive and negative database ...
6
votes
1answer
338 views

Fix end point in smooth kernel distribution density

I am using some extreme value fitting method which results in a parametric distribution for values exceeding some threshold, all values $\geq 0$. For smaller values I'd like to use a smooth kernel ...
9
votes
3answers
716 views

Multi-Factorial and Series with Triple-factorial terms

Let $n!^{(k)}$ denote a multi-factorial which is defined by $$ n!^{(k)} = \begin{cases} 1 & n \leqslant 0, \\ n, & 0 < n < ...
4
votes
1answer
290 views

Pattern matching in subscripted variables

I am trying to use subscripted variables as symbols and provide assumptions elegantly for them, e.g. in order to simplify logs, I'd like to have ...
4
votes
2answers
172 views

Vertical RadioButtonBar in Manipulate

I want to make a vertical RadioButtonBar in Manipulate. So far I only have a workaround that looks like this: ...
2
votes
2answers
286 views

How do I generate a 3d histogram of runs

This question is an extension of the question I asked here Histogram of runs. What I would like to do now is generate a Histogram3D that has the run duration on the x axis and the mean level on the ...
3
votes
1answer
351 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
388 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 ...
20
votes
2answers
569 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 ...
9
votes
4answers
993 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
220 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 ...
2
votes
2answers
411 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 ...
6
votes
2answers
461 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
191 views

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

Suppose that I have an expression: ...
4
votes
1answer
150 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 ...
7
votes
2answers
424 views
11
votes
2answers
531 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
129 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 ...
4
votes
1answer
581 views

Forget past outputs to free memory

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
573 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: ...
11
votes
4answers
880 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
181 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)?

15 30 50 per page