# All Questions

33 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, ...
89 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, ...
69 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, ...
228 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.
171 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: ...
96 views

### How to save a plot in a format acceptable to Matlab?

Say I have plotted something in Mathematica, and now I want to save it in a Matlab format (.fig). Any suggestions?
120 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 ...
23 views

...
167 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?
120 views

### Code of Maeder book

The code for Maeder's "Computer Science with Mathematica" is no longer available on his web page: http://www.mathconsult.ch/showroom/pubs/CSM/ Can someone point out alternative sources to get this ...
49 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 ...
66 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 ...
36 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 ...
50 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 ...
75 views

### Opposite function to Normal

Is there any function opposite to Normal? For example, let as say that I have an SparseMatrix A, then, let as say that for convenience for a certain operation like Packing, I convert it into an Array ...
103 views

### Isn't it possible to Pack a SparseArray?

I have the following matrix Va: ...
107 views

### shooting method and stifness problem for NDSolve

I'm trying to solve numerically the following differential equation: 1/r[x]^5 + k/Sqrt[1 + r'[x]^2] - (k r[x]r''[x])/(1 + r'[x]^2)^(3/2) == 0 I can set boundary ...
94 views

### Prove (1 + x)^n + (1 - x)^n < 2^n by using Binomial Theorem [migrated]

Hi my boss asked me to resolve this equation: Prove (1 + x)^n + (1 - x)^n < 2^n by using Binomial Theorem -1 < x < 1 ...
80 views

### How to draw the plot of a function in the complex plane? [duplicate]

I'm new to Mathematica, and I was wondering how to plot $x^n$ in the complex plane. Is there a dedicated function for this purpose?
229 views
+50

### Memory management and speed for Fast GCD

Let's say that we have some $300\,\text{K}$ digits (arbitrary function) and want to trial factor with $100{,}000{,}000$ first prime numbers. ...
114 views

### What is the Missing code in this Wolfram Blog article?

Here's a very cool Wolfram Blog Article with incomplete code, that can apply the Droste Effect to an image is various interesting ways. Copying this code, in the journal doesn't provide a working ...
82 views

### How to apply compiled function on list

Compile function output error: How to apply compiled function on list? ...
172 views

### What is the proper way to verify that two expressions are equivalent?

First of all, it appears to me that $$\left|\frac{1}{x} + x^2\right| \Leftrightarrow \frac{|1 + x^3|}{|x|}$$ is true. I don't know why, but my attempt to verify it in Mathematica failed. ...
76 views

### How does Mathematica find a series expansion of expressions containing logarithms when there is a singularity at the expansion point?

I am looking for a good approximation to a function containing logarithms, especially at values close to zero. When I used Mathematica's Series command I found ...
56 views

### Kernel crashes while doing integral function [on hold]

I am using this code to build a function: ...
67 views

### Second-order DSolve overdetermined with only 2 boundary conditions

I was going through some circuit analysis problem and came up with a second-order differential equation, which I decided to solve with Mathematica:  L\frac{\mathrm{d}^{2} I}{\mathrm{d}t^{2}} + ...
115 views

### How can I create an interactive application that accepts data and and plots it?

I have some code in Mathematica which shows a colored plot, where the coloring depends on data values. I would like to make this into an interactive application that accepts two inputs: data, a list ...
122 views

### How to un-eat memory?

Consider this code: ...
95 views

### How to plot dots on a 2D plot? [closed]

I just started using Mathematica today so I apologize if this is quite a noobish query. I have a plot command, ...
78 views

### What is available for editing Mathematica source code with Emacs?

I can find several Emacs libraries for Mathematica, but I'm not aware of a clear favourite, a definitive list, or of a library which is actively maintained and developed. None of these appear to be in ...
38 views

### How to determine the prime numbers? [closed]

What is the best way to determine the prime numbers? Is the set of prime numbers finite or infinite?
34 views

### Mathematica how to plot objects with labels in 3D plot [duplicate]

The following code plots 3 cuboids, each with a label at the lower left vertex. The label is meant to be part of the cuboid object. Yet, since Text[] is used to ...
116 views

### Prevent Grid from resizing images

Aligning my images in Grid causes one of them to become smaller, despite specifying each of their sizes with ImageSize: ...
98 views

### Getting new symbols into Mathematica

What is the easiest way get new symbols into Mathematica 9? For example I want to be able to write the Symbol \mathfrak{A} that you have in Latex. I know that ...
74 views

### NonlinearModelFit with multiple parameters

I am now trying a slightly more complicated model which actually consists of finding the parameters of 2 particles in an Image (I attached an Plot of an image). Although I put very good initial values ...
30 views

### Setting options of expressions similar to using SetOptions on objects

Introduction I often have the problem that in an expression, I want to change an option. If we are sure the option is not present, we could simply use ...
267 views

### What is missing in this Mathematica Journal Article?

So I had been looking to solve a little tiling problem and Google turned up this Mathematica Journal Article and I noticed the code was both incomplete and incorrect, so... My Question is, What is ...
288 views

### Arnold's problem #8

The famous Arnold's problems (see http://www.math.upenn.edu/Arnold/Arnold-Trivium-1991.pdf ) are aimed at the strong graduate and postgraduate students of the top universities. I find it remarkable ...
49 views

### WeatherData function problem: “NonMetricValue” returns undated list of values

In the WL example below, WeatherData[] returns an undated list of values when I add the annotation "NonMetricValue." ...
119 views

### What's the best way to generate all the upper triangular matrix whose singular values are given?

For example, given $\lambda_1 = 1, \lambda_2 = 2, \lambda_3 = 3$, what's the best way to generate all the upper triangular matrix ($3\times 3$) whose singular values are $\lambda_i$? Note:Given a ...
74 views

### What are the limits of the Prime-functions?

Will Prime and PrimePi test up to 3 * 10^12? Where can I find the limits for these funtions? ...
85 views

### Call Haskell from Mathematica and return the results inside Mathematica

I would like to learn Haskell using Mathematica's environment. I know there is the RLink protocol. Is there a similar protocol for Haskell?
35 views

### NDSolve 3 Second Order ODEs [closed]

I would really appreciate anyone who can help me with this. ...
54 views

### How to solve a PDE in cylindrical coordinates? [closed]

My equation is pde = D[Y[t, r], t] - K*(1/r*D[r*D[Y[t, r], r], r]) == 0 and its boundary conditions are ...
26 views

### Probability of 10 random digits from an array of [0,1,2,3,4,5,6,7,8,9] occuring twice or more [migrated]

It's probably something trivial for you guys, but I am quite bad at math, so ;). BACKGROUND: I want to create a system of "ID's" in the URL like: ...
42 views

### is there an option for FitResiduals in FindFit?

I know this option exists in NonlinearModelFit and probably in other fit models as well but for some reason the best result i get is with FindFit. Regards Doron
112 views

### Plot a cone in spherical co-ordinates

As we all know in spherical coordinates a function phi = π/3 gives us a cone. The cone makes an angle of π/3 with the imagined ...
52 views

### Convert Integer to Numeric with Replacement rules

I have a long list of triples, each looking something like {AGO, 1988, 2345.23}. Some of these, however, have an integer in the third spot, like this: ...