# All Questions

10 views

### a design of abstract data structures, how robust is the presented design?

I know that this question has been asked many times. This is my take at it. Ideas are not mine, they are borrowed from many posts on this site. Below is the core of the best setup that I came up with ...
11 views

### sorting large file

I have some huge log text files, containing up to a million rows each, and I need them sorted. Because trying to import one makes, obviously, Mathematica run out of memory an, approach of kind ...
17 views

### How to match a cyclically repeating sequence?

I have run across several times recently where I must match a sequence that is cyclically repeating. For example, with the sequence, Sequence[a, b, c] how would ...
28 views

### Mapping the imaginary axis of the complex (s) plane

In this problem is very difficult to analyze the roots s. Firstly I thought that the problem is in precision, but I am not sure. The criterion which I want to obtain is that one of these roots has a ...
11 views

### how to highlight edges in random geometric graph

i am trying to highlight a random graph in which edge exists if each node shares a common key like random geometric graph generation problem next i want to highlight all the edges which are associated ...
86 views

### How to get a country's official languages?

According to Wikipedia Of the 193 widely recognized countries, 178 have an official language at the national level (NB:or more than one) The only exceptions are: Cyprus, Czech Republic, ...
14 views

### Exporting data extensions in fits file

Context In Astronomy the de facto standard for images and data is FITS. I would like to exporting heterogenous data sets into a single fits file. Attempt I am interested in exporting into a fits ...
49 views

### Exporting a list as RawData or Data

My problem is quite simple yet I do not seem to figure out the solution to it. I am simply trying to export a list in Mathematica, actually a list of lists of lists etc, something like ...
39 views

To help distinguish the various dimensions, I have a model which outputs a vector in a series of time intervals, I then construct a list of these models. Next, I would like to compute the outer ...
68 views

### Drop selection of columns from a ragged array

I have an application where I need to drop some arbitrary list of columns from a ragged array (where of course the shortest array rows have at least all the specified columns). E.g., given a ragged ...
29 views

### How to define a function that operate with a base case recursively?

Let's start from the simplest case: say I have a function $f(x)=x$, and let's say I want to define a new function (of $x$) to be its $n$-th power $(f(x))^n$. How should I write the code? I tried: ...
27 views

### Functional derivatives in Feynman Path Integral

Is there any package that can simplify functional derivatives in path integrals? For instance the expression (integrate over, $x,y,z,u,v,r,s$): ...
13 views

### Error in CUDALink installation? SystemInformation[] does not report version number

I am using Mathematica 9.0.1.0 for linux, on Crunchbang "Waldorf" (Debian 7). Video card is nVidia NVS 3100m. CUDA version is 5.5, and video drivers are 331.49 as installed by smxi. My issue is ...
28 views

### How to calculate Cotton Tensor with Mathematica? [on hold]

I have calculated upto Ricci tensor. How to calculate Cotton Tensor with Mathematica?
41 views

### NumericalODE_Solve/Plot [on hold]

I have an ODE given by $${-Ea^2 } \psi''(x)+V(x)\psi(x)=E \psi(x)$$ where $a>0$ and E are constants. I need to write a code in which I can calculate $f(x)$ and $E_n$ for $n=1,2,3,4,5$ when I ...
135 views

### Differential operator squared

I defined a one-dimensional momentum operator $\hat{p}=-i\hbar\frac{\partial}{\partial{x}}$ in Mathematica p = -I * h * D[#, x]& and I want to get the ...
12 views

### NDSolve_ODESolve_Plotsolution [duplicate]

I am trying to use mathematica to solve this problem. Thank you! Given the ODE $$-\frac{a^2 V_0}{2} f''(x)-V_0\cos\big(\frac{2\pi x}{a}\big) f(x)=E f(x)$$ (a,V_0) are positive real constants. Find ...
44 views

### Elliptic curve cryptography in Mathematica

I can find no resources for doing elliptic curve cryptography. I have used the finite field package, but I find it cumbersome and it does not seem to have any builtin methods for ECC. How can I get ...
20 views

### Square root of a value defined in a finite field?

I am trying to find the right way to compute the square root of a number defined in a finite field. For example, ...
37 views

### How to get CUDALink working on linux (Crunchbang Waldorf) with NVS 3100m

I am trying to get CUDALink working on my laptop. I am running Crunchbang "waldorf" which is based on Debian 7 "wheezy". I am a linux novice. The issue is that Mathematica can "see" the nVidia ...
40 views

### Are there some other ways to solve a second PDE except DSolve?

I have a partial differential equation as follows: $$\frac{\partial p(x,t)}{\partial t}=\text{Dp} \frac{\partial ^2p(x,t)}{\partial x^2}-\frac{p(x,t)-\text{p0}}{\tau }$$ What I try to do was to get ...
55 views

Here is my code: ...
30 views

### How to convert a probability distribution to raw probability [on hold]

I have constructed tables of binomial probability distributions. I'm looking to find the raw probabilities of landing in each respective bucket, instead of having the current row's running total. The ...
81 views

### Plotting Zeros of a Complex Variable

I'm trying to plot the zeros within a certain distance from the origin using Mathematica of a given function (in my case, partial sums of the Zeta Function). I've tried plugging in simple functions, ...
41 views

### Addition of sparse array objects [duplicate]

I have been having some trouble with the addition of large (but very sparse) matrices using SparseArray. Here is the simplest example to illustrate the issue. First, I will define diagonal matrices ...
45 views

...
38 views

### Force multiplication by a single factor [on hold]

I have an expression that Mathematica decides to return in the general form: y = f ( a/f + b/Sqrt[f + 2] + c*f^2/Sqrt[f + 2]) (actually my expression is much ...
149 views

### Paste letter grades B+ , C-, A, B into notebook and not get B+C-AB

I have worked for two days to find a way through this problem. I am porting my student grade records into Mathematica from spreadsheets, or sometimes from my college web sites, or sometimes from my ...
37 views

### Represent finite sum as an integral [migrated]

I'm trying to estimate a number of iterations in cycle via integral function. For example, I can represent the cycle below ...
77 views

### Insert a linebreak and character repeatedly into a very long string

Suppose I have a very long string ...
33 views

### Importing and manipulating data in HDF format

I have two matrices A1 and A2 in HDF format. I use the following code to import them. ...
119 views

### Plotting data in a weird format

I have a lot of data on the following form: data = {{param1,param2,param3,param4,{{x1,y1},{x2,y2},...,{xn,yn}}},...} The first variables in each sublist are ...
40 views

### NDSolve example - analytical vs numerical solution. How to specify initial conditions?

So, I have the following equation: y[t]^-3 == w^2 y[t]/t^2 + y''[t] where w^2 = (t0 k0)^2. Analytic solution is easy to ...
34 views

### Differential equation with a composite variable

So I want to make a numerical solution of the following equation: $u_{xx}-(6u^5-8u^3+2u)-u_t/r = 0$ where r = $\sqrt{t^2+x^2}$ and I'd want a solution $u = u(r)$. The only constraint I know of is ...
287 views

### How to draw rectangle in mathematica with arrow

I have a basic question but i cant seem to find an answer for it. How do i draw a rectangle in mathematica with either clockwise or counterclockwise arrow heads. In this picture i know two points ...
106 views

### InstallR on OS X with external R installation

How do I InstallR on OS X to use my already installed and configured R? Simply using ...
117 views

### Interpolation: Unstructured grid error

If I try to make a table SimpleTable and to interpolate a function of two variables, I encounter a problem. For example: ...
18 views

### trying to speed up sequential use of NDSolve for large system of ODEs

I don't have a basic example just yet but I'll describe the problem for now. I have a large system (>100) of coupled first order ODEs. Where the output from one solution becomes the ICs for the next ...
36 views

### Sorting non-numerical lists [on hold]

The Sort function will by default sort from lowest to highest. In[1]:= Sort[{3, 1, 4}] Out[1]= {1, 3, 4} However, if the list ...
48 views

### How to 'center' a Histogram

How can a generate a histogram so the peak of the distribution is at x=0? I want to center these histograms for comparison ...
25 views

### Launching external program in background process with ParallelSubmit

I work on the implementation of an image processing pipeline in Mathematica in which I also would like to use external programs to do certain processing steps. As an example I have macros for the ...
496 views

### Finding differences between Pi with varying number of decimals

I have the following code In[32]:= N[Pi, 2] Out[32]= 3.1 In[33]:= N[Pi, 1] Out[33]= 3. In[34]:= N[Pi, 2] - N[Pi, 1] Out[34]= 0.*10^-1 Why can't Mathematica ...
55 views

### Polynomial GCD over a ring (with composite characteristic)

I'd like to implement the "Franklin-Reiter Related Message Attack" (see section 4.3 of Boneh's paper). As part of the implementation, I require to compute the GCD of two polynomials over ...
46 views

### Extract element from list seems not right [on hold]

I have a list of symbolic expressions. like this: ...
40 views

### Import a large no. of image from a folder together to Mathematica and assign a variable to each of the image [duplicate]

I am using Mathematica for the processing of images. For this I have to process a lot of images. Currently, I import one by one of the images to run the simulation. I want to import all the image ...
65 views

### intersection of two lines with a slope slider

I am trying to build an IS/LM model with sliders for a few things including the slope of the IS curve. I am stuck getting the equilibrium ticks and dashed lines to properly follow the intersection of ...
76 views

### Convergence in NIntegrate vs Integrate

I am faced with this situation that for a certain integration, $\int _0 ^\infty \frac { \tanh (\pi \sqrt{x} )} {\sqrt{x+10} } dx$ - the command Integrate returns ...
38 views

### Strange result using NIntegrate with Max and PDF

This is really trivial and I appologise in advance if I have made a stupid error somewhere. I have been chasing down some strange results when using NIntegrate with ...