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
217 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
210 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
252 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
134 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
152 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 ...
11
votes
3answers
2k 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
223 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
326 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
718 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
454 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
214 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
224 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
207 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
435 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
646 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
359 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
212 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
731 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
327 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
618 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
281 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
164 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
275 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
342 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
359 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
544 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
918 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
214 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
393 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
439 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
185 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
149 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 ...
5
votes
2answers
352 views
9
votes
2answers
496 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
576 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
538 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
790 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
173 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)?
4
votes
2answers
514 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 ...
4
votes
2answers
98 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
243 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
383 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 ...
5
votes
1answer
221 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 ...
6
votes
4answers
332 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
220 views

Restrict SystemDialogInput to open certain file types

The documentation for SystemDialogInput shows how to restrict the types of files shown. SystemDialogInput["FileOpen",".nb"] ...

15 30 50 per page