1
vote
1answer
186 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 ...
3
votes
1answer
260 views

NIntegrate inside NSum

Consider the following function with a numerical integration: ...
0
votes
0answers
67 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.... ...
9
votes
2answers
638 views

Is there any way to obtain an approximate inverse for very large sparse matrices?

I have a very large sparse matrix and I need to obtain its approximate inverse and save it as an sparse matrix too. Any of my efforts as could be seen in what follows fail for large n ...
5
votes
2answers
391 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: ...
6
votes
2answers
128 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 ...
4
votes
0answers
204 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 ...
2
votes
3answers
149 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 ...
1
vote
1answer
150 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
431 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 ...
9
votes
3answers
515 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 < ...
2
votes
1answer
198 views

Problem creating MeanPredictionBands

I have a problem creating MeanPredictionBands for my function which I fitted using NonlinearModelFit. I have a complex-valued ...
2
votes
2answers
195 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 ...
3
votes
1answer
178 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 ...
10
votes
1answer
449 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: ...
6
votes
3answers
271 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 ...
2
votes
0answers
514 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?
4
votes
1answer
242 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 ...
6
votes
1answer
1k 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
3answers
391 views

How to ensure that Polygon[list] plots a simple polygon?

Consider the following code which plots a triangle. p = {{0, 0}, {.2, 0}, {0, .2}}; {Cyan, Polygon[Dynamic[p]]} // Graphics Then adding (for example) ...
17
votes
2answers
704 views

ArcTan[0,0] numeric approximation

I've noticed that the numeric approximation of ArcTan is a bit different from the symbolic one. If I write ArcTan[0,0] I ...
2
votes
1answer
316 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 ...
4
votes
2answers
137 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: ...
1
vote
0answers
165 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
1answer
335 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 ...
11
votes
9answers
699 views

How to join each of the spheres? Or, how to make a 3D grid?

Graphics3D[{ {RGBColor[#], Sphere[#, 1/50]} & /@ Tuples[Range[0, 1, 1/5], 3] } ] It gives this: Now I want to get this one: How? As simple as ...
2
votes
2answers
264 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 ...
2
votes
2answers
340 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 ...
8
votes
1answer
586 views

Efficient evaluation of functions defined by NIntegrate

I have a complicated function $f$ and I want to plot the function $F(x)$ defined by the definite integral of $f$ from $0$ to $x$: $$ F(x) = \int_0^x f(y)\mathrm dy. $$ Apparently $f$ cannot be ...
5
votes
1answer
919 views

FeynArts not working properly

So I have installed all FeynArts folders (from 3.5 to 3.7) with FeynCalc 8.0.1., and none of it is working properly :\ First I load the path to specific FeynArts package (3.5 for instance), then, by: ...
4
votes
1answer
238 views

Is there a way to globally set when to treat a very small number as zero?

I understand that I can use Chop to force a very small number to be treated as 0 and can use ...
6
votes
3answers
352 views

Why don't I get numeric values from this Solve?

Solve[ a^2 + b^2 == c^2 && a < 100 && b < 100 && c < 100, {a, b, c}, Integers] gives me this result ...
4
votes
1answer
226 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 ...
4
votes
1answer
185 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 ...
1
vote
0answers
272 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 ...
4
votes
1answer
141 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 ...
1
vote
2answers
305 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
4answers
539 views

MySQL Connection Problem

I have a problem with the configuration of the J-Connector plug-in with a MySQL database. Most of the time all works well, but sometimes the connection remains blocked for 2 hours and then it gives ...
4
votes
2answers
136 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 ...
2
votes
2answers
572 views

Interpreting the interpolating function and saving data to plot with external program

So far I have been solving non-linear pdes with NDSolve and then plotting the result with the in-built Plot3D and ...
4
votes
2answers
96 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 ...
5
votes
1answer
197 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
304 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 ...
10
votes
2answers
289 views

Mathematica Typing Effect

Here is a Typing Effect in javascript. I could only implement a very simple one: ...
1
vote
2answers
311 views
8
votes
2answers
485 views

Fluorescence Correlation Spectroscopy Simulation

I am simulating Fluorescence Correlation Spectroscopy which basically involves tracking the random motion of particles in a box with periodic boundary conditions and then calculating their intensity ...
2
votes
1answer
187 views

Restrict SystemDialogInput to open certain file types

The documentation for SystemDialogInput shows how to restrict the types of files shown. SystemDialogInput["FileOpen",".nb"] ...
1
vote
2answers
167 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 ...
2
votes
2answers
311 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; ...

15 30 50 per page