0
votes
0answers
68 views

Is there a faster way to do Normal[SparseArray[{{1,1,1}→1.2, {1,1,2}→20.2, …, {m,n,p}→0.3}]]?

I have a list of the form {{1,1,1}→1.2, {1,1,2}→20.2, ..., {m,n,p}→0.3} and I want to create an $m \times n \times p$ array, $A$, where the value of $A[[i,j,k]]$ is ...
1
vote
0answers
43 views

How to apply an rule to factors matching a certain form

Suppose we have many expressions involving irrational ArcTan expressions (such as ArcTan[Sqrt[3],5]) along with other irrational factors (such as ...
0
votes
0answers
63 views

new kernel for notebook

I know I can create a new kernel for my notebook from the evaluation menu but is there a command for this? I'd really like some of my notebooks to startup their own kernel as the first line of code.
2
votes
1answer
55 views

Why does MemoryConstrained have an upper limit on the constraint?

When evaluating MemoryConstrained for a large memory limit: MemoryConstrained[Print["aaa"],10^10] I get: ...
1
vote
1answer
213 views
4
votes
1answer
163 views

Why does one of my Manipulate integer variables get turned into a real?

I'm developing code for manipulating graphs. Spot the difference in the 2 Manipulates below: ...
1
vote
1answer
127 views

Time Varying Payoffs?

I'm trying to write some code that will return the final value of an annuity whose monthly payouts may or may not be constant each month. Right now I have working code for constant payments, but I'm ...
9
votes
5answers
684 views

Fast way of finding position of Interval containing an Integer

I have a large list (about 2.2 million) of pairs of integers. Each pair defines an Interval[{}]. Given some integer x, I need to ...
4
votes
1answer
71 views

How can I change VertexWeights in a Graph?

Fixed in version 10. I evaluate ...
2
votes
1answer
41 views

is there a way to construct a pattern that would trigger when an expression is used as a held/unevaluated in some form?

For example, consider the following code f[x_] := (Print["evaluated f"]; workWith[x]); We use it, then f evaluates: ...
1
vote
1answer
83 views

Hide MathKernel Tab on Taskbar when using C++ [duplicate]

I am connecting to MathKernel.exe using C++ via MathLink on Windows. Hence, to create the link, this is what I use: ...
2
votes
1answer
59 views

Conditional clustering of elements

I have a long list like: ...
2
votes
1answer
95 views

MapThread over a nested list

This may be a simple question. Please close it if it is already answered. I have a nested list kr = {{35, 32, 27, 20}, {36, 33, 28, 21}, {37, 34, 29, 22}} I ...
3
votes
1answer
83 views

How to apply RootLocusPlot corectly

I have to analyze the complex regions of variable c which is define obtained with InverseLaplace help in the form ...
1
vote
1answer
59 views

Extension of harmonic number to the real domain

What is exactly the domain of validity of the identity: Sum[1/(k + j - 1), {j, 1, i}] == HarmonicNumber[k - 1 + i] - HarmonicNumber[k - 1] when ...
1
vote
2answers
161 views

NDsolve with variable end-point

I want to plot the solution a coupled ODEs as a function of the end point only. Mathematica code: ...
1
vote
0answers
55 views

Approximate to the speed of Build-In functions

In Mathematica, there is a function PowerMod[a,b,m], which computes a^b mod m. I will concern only this case: ...
8
votes
1answer
504 views

What type of solver does Mathematica use in LinearSolve

I have a question regarding linear equation solvers. For a specific 9x9 diagonal matrix, every method I tried in C++ (Gaus, GCC, BICGTAB ) wouldn't work, although these methods would work fine for ...
4
votes
1answer
148 views

Computing Smith Normal form of a matrix with mod p coefficients

I would like to compute the Smith Normal form of a matrix with coefficients in GF(p). In particular, I am interested in GF(2). I have used the Smith normal form packages for integer and polynomial ...
2
votes
1answer
160 views

Fourier Transform Help

I'm trying to do a Fourier Transform of the following Data, but I'm completely stuck. Here's what I've done so far: ...
0
votes
2answers
54 views

Filter through list and lump data [duplicate]

I have a very large data set (around 3000) that looks like: ...
1
vote
1answer
68 views

Invariant error plot for an arbitray system of ODE

i try to use InvariantErrorPlot command for a generic system of ODE but i find only example with pre-building equations from Mathematica Packages. This is one of ...
0
votes
2answers
213 views

2D Cellular Automaton: Initial conditions

I'm trying to write in Mathematica for a 20x20 grid, with 100 colours, with 4 neighbours. I want the initial conditions to be a 20x20 matrix consisting mainly of zeros. ...
2
votes
1answer
170 views

Export results to excel

I have the following problem solved in Mathematica ...
0
votes
1answer
182 views

Combine Plots into a single non-rasterized Graphic with no spacing [duplicate]

Suppose that I have two plots, pl1 and pl2: ...
1
vote
0answers
58 views

I need to cite the same reference several times. Mathematica citation manager messes up

Mathematica cannot seem to properly number citations when there are several citations to the same reference. Is there some trick to make this work?
2
votes
2answers
307 views

What does rule 30 mean in this example? [closed]

This starts with the list given, then evolves rule 30 for four steps. ...
18
votes
1answer
518 views

What does ImageSize -> 1 -> 1 mean?

On the page http://www.wolfram.com/language/gallery/blur-faces-in-an-image/ the example code has ImageSize -> 1 -> 1. I am unfamiliar with this chaining of ...
5
votes
1answer
213 views

Wait / sleep miliseconds

Is there any way to make Mathematica stop for some miliseconds? I know about the Pause[] but it seems it only works with seconds.
1
vote
1answer
131 views

Code Performance Tuning

The following code takes over 4 seconds to run. Any one has suggestions to make the expressions for qf, phi, ...
4
votes
3answers
185 views

How to make an arbitrary number of plots have different labels/colors/etc?

I'm sorry but I'm not sure how to phrase this question well. Frequently I have a function that produces and returns a Plot[] or array of Plot[]'s, which I can then display with Show[], or combine with ...
1
vote
0answers
65 views

Is there any way to define a new binary operator? [duplicate]

I am looking to define a new operator that would work similarly to the + or - operator. My end goal is to make a dice operator for calculating random distributions in the normal d20 fashion (e.g. 5d6 ...
3
votes
0answers
470 views

Problem inserting data into a mysql table with column names having a space

I have a mysql table whose column name has space. I tried inserting the data into this column. I got an error I tried a sample code, which tests accessing the columns with a space and that returns ...
2
votes
2answers
780 views

Parametric plot of multiple graphs on the same axes

I'm trying to plot on a single axes system multiple graphs but ran into a problem when tryinf to label my graphs. Here's what I've used so far Mathematica code: ...
6
votes
1answer
1k views

Analysis of Facebook group

I am the admin of a Facebook group for our year at university and wanted to graph the members of the group like you can with your own friends so we can find the isolated people and get rid of them (as ...
5
votes
2answers
249 views

Sorting a large file

I have some huge logs, which are text files, containing up to a million rows each, and I need them sorted. Because trying to import one obviously makes Mathematica run out of memory, we must rule out ...
13
votes
3answers
479 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 ...
0
votes
0answers
168 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 ...
4
votes
2answers
369 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, ...
10
votes
4answers
448 views

Exporting data extensions in fits file

Context In Astronomy the de facto standard for images and data is FITS. I would like to export heterogenous data sets into a single fits file. Attempt I am ...
1
vote
1answer
143 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 ...
0
votes
1answer
96 views

confusion about the use of MapThread and out product

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 ...
10
votes
1answer
256 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 ...
0
votes
1answer
93 views

How to define a function that operate with a base case recursively? [duplicate]

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: ...
0
votes
0answers
43 views

Functional derivatives in Feynman Path Integral [duplicate]

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$): ...
3
votes
2answers
464 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 ...
0
votes
0answers
224 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 ...
0
votes
1answer
63 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, ...
2
votes
1answer
279 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 ...
2
votes
0answers
91 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 ...

15 30 50 per page