5
votes
0answers
138 views

Units: Custom-defined units possible?

Converting between revolutions per minute (RPM) and revolutions per second (RPS) is not straightforward for me in Mathematica. I know that $1\; \text{RPM} = \frac{2\; \times\; \Pi\; ...
0
votes
0answers
186 views

Solving for equilibrium distribution (symbolic) by matrix multiplication

I have a huge transition matrix (81x81). The matrix is too huge to paste here, so I store it in this notebook. (There are constraints on the symbols: $0<p_b<1$ and $0<p_g<1$. If further ...
17
votes
4answers
1k views

How to create effect like Van Gogh's stroke brush?

I need to apply Van Gogh's stroke brush effect to a random image Take the following image as an example: Thank you so much if you could help!
0
votes
0answers
96 views

Making a predictive statistical model

I am totally new to Mathematica, and I have never used a similar program, apart from perhaps Excel (and I didn't even use Excel on a professional level). So I want to create a mathematical model ...
1
vote
1answer
162 views

How should I go about writing more functional and list based code? [duplicate]

I've heard that Mathematica is usually faster when the code is list-based and/or uses a functional paradigm. I'm still working on getting the hang of this; there are a lot of ...
1
vote
1answer
164 views

How do I construct a non-linear model from experimental data?

I want to find a function $w=f(x,y,z)$ that fits experimentally determined values of w. For example, assume ...
2
votes
2answers
112 views

Deleting elements on a list by the first element of another list

I was trying to make this L1 = {{2, 1}, {6, 4}, {8, 7}, {9, 5}}; L2 = {{2, 9}, {9, 6}}; L = Union[L2 , L1] And I used this: ...
1
vote
1answer
71 views

Defining functions that reference other values

How could I define a function that references other values? eg a = 2 x; b = 4 k; f[k_, x_] := a^b
0
votes
1answer
167 views

Is it possible to convert expressions containing Root objects to Excel formulas?

I am still a beginner and do not fully understand pure functions and root objects. When I tried to calculate the inverse of a function, Mathematica gave me: ...
1
vote
0answers
528 views

Threads vs Cores: How many kernels need to launch in parallel Mathematica?

I have a dual-core intel machine. I would like to test how many parallel local kernels should be launch to get the optimized performance. Knowing that the HyperThreading technology of Intel could run ...
2
votes
1answer
79 views

Need to run evaluation 2 times

Why does this only work after running the evaluation 2 times? ...
4
votes
1answer
224 views

Edit Plot/Graphics after it's been drawn. [duplicate]

Sometimes I run into a situation when there are graphics objects (mostly plots) that take a while to draw. Good practice would suggest you do all your evaluation outside ...
3
votes
1answer
154 views

How to simplify to form without imaginary unit

I have an integral that I compute with Mathematica and as a result I get a seemingly complex expression (i.e. the expression contains the imaginary unit, $i$, at some places). However, if I try to ...
5
votes
4answers
418 views

A fast way to compute arrays avoiding If or Which

I found out that if I have to calculate huge arrays with most of the elements being zero( let's say each row has 10000 elements and only 8 are non zero) and the non zero elements' positions being ...
1
vote
0answers
30 views

Internals of Prime function [duplicate]

Does anyone knows how exactly Prime works ? For example how Prime[1000000000] is calculated ? The only information I found was ...
1
vote
1answer
85 views

ctags for Mathematica files?

I alway use vi to edit Fortran files. I can use ctags to know which variables and functions I have already defined. Now I use vi to edit Mathematica *.m files. I tried to use ctags for *.m files, but ...
1
vote
1answer
120 views

MAP a business cycles model

There is a Business Cycles Map on Phaser 3.0 and I've trying to run it on Mathematica the last four days without succes. The equations are $$ x_1 = (1.0 - a s)x_1 + a \left[s m + g \left(\frac{s ...
1
vote
0answers
56 views

How can I control the size of exported image in HTML code under certain magnification value?

I've inserted a picture in one cell, however, when I exported the cell as HTML, the size of my image in the html tag was doubled(the image file in HTMLFiles was the same as the original image). I ...
5
votes
0answers
137 views

Issue with FindCurvePath

I have a problem with the function FindCurvePath. In some cases it crashes the Mathematica 9 Kernel. Here an example, where it crashes the kernel: ...
5
votes
2answers
726 views

How to convert a string of number into real numbers without precision loss

I searched and did not find similar answers which can resolve the 'no precision loss' issue. A sample string is: ...
6
votes
3answers
286 views

Mapping a function that assigns values to a list over a different list

I'm trying to get used to Mathematica's approach to programming and list manipulation, and am struggling with one thing. Say that I have a function f which takes a ...
2
votes
2answers
79 views

Forcing RecurrenceTable + NIntegrate to evaluate lazily

I have a recurrence relation that grows exponentially if expressed in closed-form. I need to integrate this function. If I plot it, I think Mathematica evaluates the recurrence numerically at every ...
1
vote
0answers
225 views

Slow Open Dialog user Interface in Mac OSX Mavericks

The other day I noticed an interesting problem with Mathematica on the Mac. When I'm in the Mathematica application and try to open a mathematica file with the "Open" option of the file menu the open ...
0
votes
1answer
75 views

Pure function in Nest

I can't figure out what I'm doing wrong here: Table[Nest[# + 0.1 * -i * #^2 &, 2, 1] , {i, 0, 0.5, 0.1}] (* {2., 1.96, 1.92, 1.88, 1.84, 1.8} *) The problem ...
1
vote
1answer
188 views

dynamically set fit parameters and models with FindFit

I want to fit a gaussian profile by setting some values dynamically, but FindFit returns an error and i can't see the problem. with a given gaussian: ...
1
vote
0answers
49 views

Georeferenced bitmaps

The command Export["filename.jpg", graphic] will export the graphic object graphic to the file ...
3
votes
2answers
249 views

Can Mathematica identify formulae or sequences of numbers?

Can Mathematica suggest what a formula means? For example if I input $$\sum_{i=0}^n i$$ can it infer that this is a sum of integer values from $0$ to $n$? Or if I enter $0,1,1,2,3,5,8,13$, can ...
-1
votes
1answer
82 views

Button with for loop

How can I call a function that has a for loop inside a button? If I just write button[{"name", function[]}] nothing happens.
6
votes
2answers
281 views

How create true reflect movement disk in the ellipse?

Help me please. Task: Disk movement inside the Ellipse so that naturally Disk reflected from the walls and continued to move. Thanks. My friend was able make a move on the square only: ...
0
votes
3answers
311 views

Plotting Voxel in mathematica

I am developping a 3D reconstruction application. I recuperate the voxels coordinates (the coordinate of each voxel) of the object that I need to reconstruct. Each voxel have a dimensions like this ...
0
votes
1answer
170 views

Feynrules -> FeynArts issue

When I try to use model files generated by FeynRules in FeynArts, I always get errors of this form Coupling definition in ...
4
votes
3answers
252 views

First 10 digits of $\pi$ without rounding

I need to have $\pi$ with an accuracy of $10$ digits. My first guess would be N[Pi, 10] However, this rounds to the last digit instead of just chopping of any ...
9
votes
4answers
253 views

No response to an infinite limit

Trying to compute this limit, things seem to get frozen, even for hours. What would you recommend to fastly compute it? ...
0
votes
0answers
69 views

Algebraic condition from a non linear equation

I have got a system of equations which look like this: $\theta_{1}^{2}e^{\phi_{1}\cos(\Omega z)}\tilde{w}\cos^{2}(\theta_{1}\sin\Omega z)\sin^{2}\Omega z+\frac{1-\lambda\cos(2\theta_{1}\sin\Omega ...
1
vote
1answer
594 views

How to find the area between two curves

Find the area between y = 1 - x/π and y = Sin[x]. Here is what I have typed in so far into Mathematica: ...
0
votes
0answers
36 views

Color scaling in ListDensityPlot [duplicate]

I've a simple question, surely aleredy asked, but I can't find a simple answer to it. I've got 3 lists ...
1
vote
1answer
81 views

Specify positions in a SparseArray using patterns with functions

I spent some time trying to figure out what was what was making so slow the calculation of the following array(actually this is only a SUPERsimple toy model): Input to the array: ...
4
votes
3answers
186 views

How to compile a diagonal array efficiently?

For example, if we use some functions defined prior to Compile, we usually have the main evaluators in the compiled codes, pointing to the definition of the ...
1
vote
1answer
62 views

Multilpe matrix (mxm) and vector (n), wich are unequal, so get a (three dimensional matrix) mxmxn matrix

For example I have this matrix: mk = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}} and I'd like it to multiple with this: ...
3
votes
0answers
65 views

Efficient storage of Kronecker sum of circulant matrices+diagonal matrix

I have a square matrix of the form $$M=D+\overset{N}{\underset{n=1}\bigoplus}R_n,$$ where $R_n$ are circulant matrices, $D$ is a diagonal matrix and $\oplus$ is Kronecker sum. Its size is quite big, ...
0
votes
0answers
114 views

Improving Function with Loop Structure

I'd like to write a function that would perform a loop, I guess Do or While should be helpful here. I've simplified the problem, ...
0
votes
1answer
136 views

NMinimize stops with no more memory?

I am using NMinimize function for simulation based optimization. So my objective function is a simulation that runs for every combination of variable values evaluated by NMinimize function. However, ...
8
votes
3answers
289 views

Find the best parallel lines to a given data set

I have a set of data in an uptrend. I would like to find two BEST parallel lines to contain all the data but I don't know how to approach it, anyone can help ? Thanks.
3
votes
2answers
397 views

Plot3d: How to color a surface according to the slope of the surface?

Here is my approach, for an example surface function: surface[x_, y_] := Sin[x y]; The normal vector of a point in the surface is computed as: ...
12
votes
1answer
256 views

Formatting Excel Borders with .Net

I have various tables generated in a Mathematica application and need to export this to MSExcel formatted in a specific way. The ...
10
votes
1answer
346 views

Scheduling Mathematica scripts to run from a command line [duplicate]

I want to run Mathematica "jobs" on a daily/weekly basis to do system maintenance and as part of daily processing operations. What is the best way to do this?
0
votes
2answers
85 views

Code for sum of exponential divisors function

Consider $n = p_{1}^{a_1}\cdots p_{r}^{a_{r}}$. An integer $d = p_{i}^{b_{i}} \cdots p_{r}^{b^{r}}$ is called an exponential divisor of $n$ if $b_{i}$ divides $a_{i}$ for every $1\leq i \leq r.$ I am ...
0
votes
1answer
137 views

How to construct a graph from a list of edges

I have a list of pairs of numbers, representing connections between objects in the real world. Each number is the identifier of an object, there are gaps in the range from the smallest number to the ...
0
votes
0answers
41 views

Manipulate freezing on large calculations [duplicate]

I have a sum that ordinarily takes some time (2 - 3 seconds) to calculate. When I put it into a manipulation though, it becomes very temperamental. It will work on some very small calculations, but ...
3
votes
1answer
129 views

Manipulate with formatted output

I would like to have 4 output fields for something like the following: Manipulate[ n*x n/x n + x n - x, {n, 1, 10}, {x, 1, 10}, ControlType -> InputField] but ...

15 30 50 per page