All Questions

89 views

I have a graph defined as follow: ...
117 views

Finding permuations in a specific order

I would like to find the following permutations, but need an elegant way of computing it. Ideally I would like to have a variable determine the highest number in the last element and find all ...
83 views

How to accumulate elements in a list using Reap and Sow [duplicate]

Does anybody know how to rewrite this fragment using Reap and Sow instead of AppendTo. I need to reduce the execution time. Thank you. ...
164 views

Instant kernel crash when using += on SparseArray with repeated entries

Bug introduced in 5.2 and fixed in 10.1.0 Not sure if this is known behavior or not, but the following two lines produce an instant kernel crash (I'm using Mathematica 10.0.1 Windows 64-bit): ...
112 views

Fitting with roots of transcendental equation

I'm new to this community and my first question probably reflect my lack of confidence with Mathematica. My problem is the following: I find the roots of a transcendental equation dependent on a ...
236 views

Manipulate: Play the animation only once and stop

I do small animations with Manipulate, but sometimes I don't like that it runs over and over again from start. I would like to have the possibility to stop the ...
67 views

How to programatically set options for a selected word?

I want to create a palette with buttons and have it apply to the selected word. No matter what combination I try it always applies it to the entire cell. Imagine that in the sentence: ...
142 views

OpenCL matrix multiplication on Mathematica

I took a matrix multiplication written using OpenCL from here: ...
114 views

How to make X and Y = Z? [closed]

Hello I have a big question, maybe it's extremely easy but for now I'm unable to make it work. I'm a programmer and what I need to do is for example: if X = 2 and Y = 1 then Z = 1 if X = 3 and Y = 1 ...
525 views

How to implement the directed Barabasi-Albert algorithm in Mathematica?

Does anyone know how to implement an efficient version of the [directed Barabasi-Albert algorithm][1] in Mathematica that scales until hundred of thousands nodes? The directed network mechanism is ...
598 views

All binary sequences with length n

I don't know if there is a built-in function for this, but I'm thinking about something like this Outer[List, Table[{0,1},{n}] ] But ...
406 views

Bug in complicated Limit

The code Limit[Log[2 - Sin[x]*Cos[x]], x -> Infinity] outputs Interval[{0, Log[3]}] in Mathematica 10.0.2.0 . It should ...
348 views

How can I detect if an image is in or out of focus?

I need to filter out bad (blurry or ) images from a set, with some sort of blur detector.
370 views

Mapping Contour Plot onto ListPlot3D (or by using color variations) [closed]

I am trying to overlay a contour plot I have created on a ListPlot3D graph. I have seen a few questions answered on this website that answer my basic question. ...
83 views

How to insert Tooltip into incidence plot?

I'm trying to make a graph using a file .NET extracted from a file .CSV and to make tooltiped the vertices' labels. Initially I ...
128 views

Why is chop being ignored? [closed]

If I use Chop[10^-4, 10^-3] then I'd expect the output to be zero. However, this is not the case. There is of course a very easy workaround since I can define ...
112 views

Toggle plot visibility of dynamic number of data sets

I have multiple curves in my plot, and want to be able to toggle their visibility off/on. Which I got to work thanks to a different post. ...
156 views

...
72 views

Computation doesn't Finish

I'm trying to solve some problem by the following code: ...
87 views

...
91 views

Why does Mathematica Spawn Additional Dock Icons on OS X?

I've been running a calculation in parallel that requires a rasterize, and doing this requires one to wrap the rasterization with a UsingFrontEnd command (as is ...
1k views

FEM - how should I impose periodic boundary conditions in pure space problems?

I have searched other threads, but I was not successful in finding an answer I could understand. Right to the point: how do I impose correctly periodic behavior on the edges of the rectangular ...
327 views

How would I programmatically add a row to a Dataset?

I would like to use a Dataset to track the process of a lengthy calculation over a large volume of material. Dataset appeals to me because of the power of the queries and it also looks like it may ...
155 views

Kernel sometimes quit after second evaluation of ListVectorPlot

But introduced in 10.0.0 and persisting through 10.1 (update: bug remains in 10.1 on windows) In Mathematica 10.01 Linux x386 execution of the expression ...
105 views

Change ParametricPlot3D tick labels and origin

I have very complicated task, I'm trying to plot electron wavefunctions. As you see, I've managed to do it, except few things: how do I change tick labels of 10^-8 meters to nanometers? how do I ...
383 views

Generalization to AllTrue, AnyTrue and NoneTrue

I am wondering if there is a natural Mathematica way to generalize those functions. To be specific, All three functions AllTrue, ...
203 views

How can I combine two color schemes for plotting?

I want to use ListContourPlot to display all negative values using one colorscheme and all positive values using another color scheme. This question Define a color function using Piecewise gives some ...
162 views

Replace expression, but only “outside” of a function [duplicate]

I have a horrid expression, which is basically a sum of exponents with coefficients. Here's a taste: What I want to do is to replace ks with another expression, ...
128 views

...
175 views

Plot a bunch of lines in 3D from point data

I have a 12*25 array, wherein each entry is of the form $\{x,y,z\}$. So 12 different $x$ values, 25 different $y$ values and 12*15 $z$ values in all. I'd like to plot 12 curves of various $x$ values ...
188 views

Periodogram for irregularly spaced data

I am trying to replicate some existing work on the length of the cycles in certain economic data. Specificially, I am using the Schularick and Taylor (2012) data set to replicate the periodogram shown ...
302 views

Why is (-1.)^2. a complex number

Why (-1.)^2. in Mathematica returns a complex number? It looks like in both C and Fortran it returns 1. Why does Mathematica behave differently than the other ...
128 views

Guidance for CDF Development, Security and Future of CDF?

We have a number of R&D projects where we would like to show on going results in a distributed CDF application. This would be similar to monthly reports. There are some fairly heavy security ...
190 views

How to automatically make the maximum of each row in a table(grid) bold?

TableForm[Table[i/j + 4*Boole[j > i] // N, {i, 3}, {j, 4}], TableHeadings -> {{"Row1", "Row2", "Row3"}, {"Col1", "Col2", "Col3", "Col4"}}] Produces the ...
602 views

Color a Function by its Derivative

Mathematica's ColorFunction seems to struggle with coloring a function "y" by its derivative D[y,x]. This is a seemingly simple task, but Mathematica can't handle it. While I can certainly evaluate ...
147 views

Breaking a While loop

A simple example to illustrate what I'm talking about: m=0; While[m<=50, m=m+1; p=m] The result is: m=51 p=51 In ...
102 views

When printing a notebook in Mathematica 10, code sections do not wrap

I have a Mathematica 10 notebook where I am using code sections. The text in the code section does not wrap when printing. Is there a setting that I should use to allow the code to wrap?
74 views

What was the thought behind the parallel versions of Table, Map, etc..?

There separately named versions of the parallel analogues of Map[] and friends: ...
133 views

How to mimic Org-Mode with cell dingbats?

I love using org-mode to organize my to-do lists, the functionality is amazing, but it suffers from being stuck inside the emacs terminal... I'm hoping to replicate some basic features into a ...
216 views

Synchronizing the camera view of multiple Image3D panels within a Manipulate interface

I'm trying to synchronize the camera view of multiple Image3D panels displayed within a Manipulate interface. A random 3D image ...
104 views

StateSpaceModel- damped oscillator

I'm new in Control system and in Mathematica too. res1 is the state space as follows ...
105 views

Intensive test parallel computation?

I need an example of a not-too-complicated yet intensive parallel computation in Mathematica. The result of the computation should be known before hand. I need this to test the capabilities of a ...
178 views

Extracting coordinates from 3D plots

Is there any possibility to extract the coordinates of a point (x,y,z) from a 3D plot in Mathematica with the cursor? What can be done for this purpose?
42 views

Join a surface and a density plot [duplicate]

My question is if it's possible to do something like this with Mathematica: I know that it is possible to plot a surface with Plot3D and a 2D plot with DensityPlot, so I was wondering how to join ...
286 views

Replacing parts of a matrix

I'm a beginner to Mathematica and to writing scripts in general. I'm currently trying to write a code that will take any element in a matrix higher than a certain threshold value n and set it equal to ...
101 views

Products of Differential Operators

I have a differential equation defined as the product of operators which I want to expand out into a polynomial in powers of $z\frac{d}{dz}$ $\qquad \prod_{n=1}^p(z\frac{d}{dz}+a_n)$ However when I ...
201 views

Append new data to excel?

From this post I know that I can export my data from mma into any given position (such as "B3"), but now I want to append new data to the old one. As an example, ...
70 views

Incomplete Parallel Mapping

I am still struggling on how to nicely handle list operations in Mathematica, and perform simultaneously parallel computation. We consider a tab of the form ...
848 views

Import a given column from an excel file? [closed]

It seems that I can get the first column of excle data, say "test.xls", if I know the total length... ...
161 views

BUG: Problems generating FEM ElementMesh in 1-D

fixed in 10.1 (windows) I'm trying to build an ElementMesh for a simple 1-D problem. First, I build the boundary ...

15 30 50 per page