4
votes
3answers
674 views

Stop Computation - Is Exit[] overkill?

The following example either finds a factor of the number $n$ or returns a message saying that the number in question is prime (I specifially wrote this to demonstrate my question below). ...
5
votes
1answer
273 views

VariationalD giving the wrong solution?

EDIT: As pointed out in the comments, VariationalD gives a variational derivative (which I don't want), not a derivative with respect to a function (i.e. ...
3
votes
1answer
233 views

Creating event handler with ImplementJavaInterface inside a package

I am trying to make my Mathematica function to serve as an event handler for the events generated by a Java object. Specifically, I have a Java object that connects as a client to a server that ...
2
votes
2answers
292 views

Need an efficient method for finding certain matrices

I am trying to write a function which produces square matrices with certain characteristics. The function should have two inputs: number of the rows, n number of ...
12
votes
1answer
298 views

Why is my rasterized graphic blank?

Bug introduced in 7.0 or earlier, and persisting through 10.1 or later (OSX 10.10.2) Consider the following code: ...
7
votes
1answer
1k views

How can I get better control over StreamPlot?

I'm having some difficulties with the command StreamPlot in Mathematica 7.0. Here's the basic plots I'm doing : ...
4
votes
1answer
678 views

RSolve Lotka-Volterra: A Closed Form Solution to this Difference Equation?

I would like to solve a difference equation, a Lotka-Volterra difference equation. I tried a model from http://www.stolaf.edu/people/mckelvey/envision.dir/nonDE.lotka-volt.html Using their ...
1
vote
1answer
253 views

Fast integration of 2D distribution across lines parallel to y-axis

I'm struggling with a small data set and a slow calculation. I have hundreds of small 2D data arrays and need to integrate across several lines parallel to the y-axis. Let me start with the data ...
2
votes
1answer
211 views

Coarse-graining and/or sorting of a list of arbitrary triades {x,y,z} in the (x,y) plane [duplicate]

In general my question is related to an approach to make an interpolation of a data which is not on a regular mesh. Another aspect of this question has already been discussed after my question ...
2
votes
1answer
139 views

Composition with Apply

Composition is sometimes useful for clarity of a code. For the same purpose I try to Apply(@@) functions as often as it is ...
8
votes
2answers
262 views

Efficiently initialize list of consecutively named variables for file import

Let's say I have the code: ...
4
votes
0answers
137 views

Efficient Generation of Subgraphs (or, unfriend a friend a day)

NB: If you're not interested in the back-story, you could simply jump forward to the code which I'm seeking to optimize. Also, I believe this code would only work for MMA 8.0 and above. My friends ...
4
votes
3answers
265 views

Solving $(-1-z)^n = z$, for $z$ in the unit circle

I want to solve the following equation: $$(-1-z)^n = z,\quad |z|<1,\quad n>1\in \mathbb{N}$$ where $z$ is a complex number. However Solve or ...
-2
votes
2answers
422 views

How to push the data from database?

I want to push the data from database to Mathematica application instead of application(MM App) pull the data.I have installed ms sql server and apache tomcat server. I have my application in apache ...
0
votes
1answer
783 views

Solving coupled eigenvalue differential equations

I am trying to solve an equation of the form as follows $\left(\begin{array}{cc} -\frac{\hbar^{2}}{2m}\frac{\delta^{2}}{\delta z^{2}}+\sin^{2}\left(z\right) & z\\ z & ...
5
votes
1answer
212 views

How can I get vectorized text when exporting to pdf?

Consider this code: ...
5
votes
1answer
346 views

How to convert an image to a compressed string representation equivalent to one copied to clipboard by `CopyToClipboard[image]`?

In my recent question I asked How to embed an image into a string? The suggested solution was ...
3
votes
2answers
340 views

Converting Mathematica Greek letters from Notebook to Unicode Form in SE

Related : How to "Copy as Unicode" from a Notebook? ...
5
votes
1answer
447 views

How to export large matrix from .nb file into .pdf

I have one technical problem with printing large matrix 50x50 with lot of data. Always when I want to export .nb to .pdf, I can see just part of matrix, never all. Is there solution for this? I need ...
3
votes
1answer
163 views

Issue with scope of variables

For the definitions, t = 1; f[x_, y_] := t (x + y); v[3] := {1, 1}; g[u_] := f[v[u][[1]], v[u][[2]]]; the following two expressions yield different results, ...
0
votes
1answer
762 views

Fit implicit function

Can anyone help me with fitting an implicit function to data? The function is given by: a*x^2 + 2*b*x*y + c*y^2 = e under the condition ...
0
votes
1answer
657 views

Factoring a quintic

I am trying to prove that a quintic polynomial, $p(x) = A5 x^5 + A4 x^4 + A3 x^3 + A2 x^2 + A1 x + A0$, which admits at most three real roots. Unfortunately Descartes' rule of signs does not help, ...
13
votes
6answers
677 views

Sort+Union on a list

Probably this is too trivial question for this forum but for some reason I am not getting it on my Mathematica 7 so far. I have a list ...
11
votes
2answers
743 views

Dynamic Programming with delayed evaluation

By using dynamical programming, we can save intermediate steps for recursive relations, as in f[n_]:= f[n] = f[n-1] + f[n-2] However, this only stores ...
2
votes
0answers
86 views

Opening cdf file from command line with arguments on windows

I want to write a cdf file to read in the commmand line arguments and then do something with them. Something like this: Mathematica.exe 'filename.cdf' arguments ...
18
votes
1answer
154 views

Help understanding overloading of Atomics within Block

Usually h @@@ {f[1, 2], f[3, 4]} === {h[1, 2], h[3, 4]} but this is not the case when f is ...
4
votes
0answers
127 views

How can you link Parallel Mapping and Error tracking

Following this question and the comments made, together with the information in this question, the following code allows error tracking and debugging very nicely. ...
3
votes
0answers
84 views

Duplex Printing from button inside DialogNotebook on Mac

All, I have the following code which generates a window containing the variable PrintOut and a Print button. When the print button is pressed the contents of the window are sent to the printer and ...
8
votes
2answers
366 views

How to display the support $\mathrm{supp}(f)$ of a piecewise function $z = f(x,y)$?

I'm wondering how to display the support $\mathrm{supp}(f)$ of a piecewise surface $z = f(x,y)$. As an example, let's consider the following piecewise function (and plot it): ...
2
votes
1answer
290 views

RegionPlot3D Error

I have the following command: RegionPlot3D[ Log[p1/(1 + p2)] > 0, {p1, 0, 0.5}, {p2, 0.5, 1}, {C, 0, 1}] and my Mathematica 9 gave me the following error ...
1
vote
0answers
207 views

problem with exporting transparent object to pdf in version 9

Here is the code: Export["~/Downloads/1234.pdf", Graphics3D[{Lighter[Black], Opacity[0.5], Polygon@Table[{Cos[x], Sin[x], 0}, {x, 0, 2 \[Pi], 0.01}]}]] in ...
4
votes
2answers
1k views

Does Mathematica have a command analogous to ode45 of MATLAB?

Does anybody know if Mathematica has an analogue of MATLAB's ode45 command? I need to solve a second order coupled ODE system of equations.
-1
votes
1answer
89 views

How to make rules for changing parameters

I have one boring problem with changing parameters in printing output. If I have equation ...
6
votes
6answers
724 views

Sort list by day names (Monday, Tuesday, etc)

I have some dates in a list, and I want to plot how many of those dates are Monday, Tuesday, etc. I'm using this: data = {...} Tally[DayOfWeek /@ data] and I ...
3
votes
2answers
333 views

How can Mathematica convert CMYK values to RGB or HSB?

...
-4
votes
1answer
160 views
3
votes
2answers
418 views

Transcendental equation inside another equation when 3D plotting

I have been trying to solve this plotting problem myself, and I have received a lot of very useful advice from here on Stack Exchange - but I am now at a complete loss as to how to achieve the plot I ...
1
vote
0answers
191 views

Simulations with MonteCarlo and Autoregressive methods

I am trying to find the best-fit trend for my data. Here I just generated it but let's say I don't know my data trend at all. ...
6
votes
3answers
282 views

Displaying a locator that moves smoothly and updates some dynamic variables

I want to select a point on a graph and display a function of the coordinates value. Asking here a related question I learned to use Setting. Consider the example, where I display the coordinate ...
1
vote
1answer
680 views

Plotting a network or a graph with given coordinates for vertices

I'm new to Mathematica yet have coded a lot in MATLAB. Currently I'm working on a network simulation. My model is implemented in MATLAB, but I need to port it to Mathematica. Here is my question: ...
0
votes
2answers
147 views

Can you label an array by variables or strings instead of integers?

Is there a way to label an array by a variable instead of an integer? For example calling the array I[i,j] with {i,j} = {x,y,z} ...
0
votes
0answers
40 views

Nested For Loops that result in no output [duplicate]

I am sure that this is not the most elegant code you will have seen, but I am trying to loop through an expression to see if FultonHarrisn] produces any outputs ...
4
votes
3answers
197 views

Output to preserve dot product

I am fairly new to Mathematica and I am faced with a problem. I tried to search for the solution but it seems that I don't know how to formulate the short search request. I need to perform a matrix ...
4
votes
1answer
392 views

ListDensityPlot performance when scaling axes

I need to visualize 3D data having 200*200 data points. ListDensityPlot is a good candidate, but it seems to have strange performance issues. I created a small ...
9
votes
5answers
5k views
3
votes
2answers
603 views

RecurrenceTable with a recurrence function of two variables

I have to calculate the cool down process of a regenerative heat exchanger. I solved the problem in Excel before, but now I want to do it with Mathematica. I want to create a table with the variables ...
9
votes
2answers
1k views

Writing data to a common file during parallel processing

I am executing a loop, and in each loop I have to store a parameter in a file. It is like ...
4
votes
3answers
137 views

Graphics updating from inside double-Fold-iteration within Manipulate

Normally, when using Manipulate[expr, controls, options], the graphics updating should be carried out at the very end of expr. But now I encounter a situation ...
13
votes
2answers
678 views

How to create custom Graphics primitive?

How to create custom Graphics primitive? It should have the following properties, resembling properties of built-in geometric figures, like ...
1
vote
0answers
140 views

Remote access to notebook is very slow

I am using Mathematica at work remotely from a computer in my building and I can edit notebooks by opening them from terminal via ssh without problem (a little slow if there is a figure with many ...

15 30 50 per page