# All Questions

142 views

### Patterns of function-arguments in expressions

I want a function that compares an expression with a specific pattern. The expression has always the following form: ...
146 views

### Unexpected output from oddSublists [duplicate]

I have just bought Mathematica and I'm in the process of plowing through Shifrin's great book. On page 74 the function oddSublists doesn't give me the expected ...
110 views

### CurveGraphics for 3D System of DEQs

I am using the CurveGraphics6 NB to try and do some 3D related phase portraits and graphics. The following works and produces an animation. ...
168 views

### Savitzky-golay filter

How to use Savitzky-golay filter on csv file? I have file.csv in this format: 0.1,1.6,2.8,0 0.2,1.2,2.3,1 0.7,1.5,2.4,2 0.6,1.2,2.7,3 0.4,1.4,2.9,4 0.3,1.3,2.5,5 ...
224 views

### Nested Derivative

These two expressions are mathematically the same, but when substituting with the same rule, yield different results. What is happening? ...
23 views

### $H_{\infty}$ optimization of transfer function matrix [duplicate]

I have a two-dimensional $(2 \times 2)$ transfer function matrix like this: $$G(s) = \begin{pmatrix} \frac{1}{xs+1} & \frac{1}{s+0.5}\\ \frac{3}{s+3}& \frac{1}{ys+2} \end{pmatrix}$$ The ...
120 views

### Collecting terms in an expression [duplicate]

I have an expression: ...
195 views

### Cropping a Plot without rasterization

Suppose that I make a plot of $x^2$ vs. $x$: myPlot = Plot[x^2, {x, -1, 1}, Frame -> True] If I click on the plot, I see the orange handles with which I can ...
129 views

### SSH known hosts in Windows (Error code = 124)

I had to re-install Raspbian OS and now it has new SSH key. SSH clients usually let ignore this fact and save the new key, but not now. Mathematica gives no way to go if the Host Key was changed. I ...
188 views

### Sporadic bugs in multidimensional SparseArray objects

Udate This SparseArray[] bug is (apparently) fixed on version 10.0 ...
444 views

### Most influential and/or disrupting features introduced with new versions of Mathematica

This is something that has been bugging me for ages. With every upgrade, Mathematica has added new functionalities and amendend some of its bugs. In the process, though, some older functionality has ...
171 views

### Saving a graph of a great number of nodes

I'm developing a code where I get graphs with over 10K nodes. These graphs have a particular relationship between clustering and degree that I need to save for future analysis. The problem is when I ...
773 views

### Euler's method for system of differential equation

I need to program Euler's method to solve a system of two diffferential equations of first order. Fist, I have programmed the Euler's method for just one differential equation: ...
406 views

I was trying to run some notebook I downloaded from MathWorld, but lots of them need << MathWorldCurves I tried to google it , only to find this, but ...
209 views

### The introduction for Context in Wagner's book is out of date? [duplicate]

In Section 8.1.1 (P230 of the book, P249 of the PDF) of Wagner's book, the following example is shown: x = 5; tempx = 6; Begin["temp"]; {x, Global`x} The ...
164 views

### Fitting data using a series of Sin and Cos

I have the following data representing the normal displacement caused by a normal load applied at the middle cross section of a cylinder: I've made the data available here. I am trying to fit ...
147 views

### How do I NOT change the input/output number when editing?

I tried to search for a topic on this, but didn't seem to find anything, so here goes. I'm pretty new to Mathematica, so there are a lot of things I don't know yet, but one thing is pretty annoying ...
155 views

### Improving performance in the generation of random (directed acyclic) graphs

I need to generate large (directed, acyclic, transitive) graphs. My code in Mathematica gets very slow for large numbers of vertices. I've tried a number of approaches and I can't find any significant ...
156 views

### The output is the same as Input when I add the boundary conditions to a PDE

I am trying to solve a PDE in the first order with specific boundary conditions. When I solve use DSolve without the boundary conditions, Mathematica gives me an answer in an arbitrary function. When ...
150 views

### How to combine multiple functions into a single function, indexed bya new argument

I have a system of expressions (matrices) which correspond to increasing orders of precision in a theory. These expressions are quite complex (require about 40+ lines of code to produce) and are not ...
202 views

### Summing Over a Variable Number of Indices

I am trying to figure out the best way to include a variable number of indexes of summation in a program. For example: Suppose I want to define a function $g[n,s]$ that returns the sum ...
140 views

### Arguments for ChartElementFunction

I was reading the documentation for BubbleChart and I saw this example ...
139 views

### Simulation code performance tuning

The following simulation takes over 20 seconds for evaluation. I have difficulty re-coding it with Nest and Map or Compile functions to make it more efficient. Can some one help with this? The ...
173 views

### combining manipulate with “static” plot

Is there a way to show a plot of a "static" function as background for a manipulate panel ? In other words: I have put into a manipulate a trajectory (solution of a system of two differential ...
296 views

### Slow mixture fitting when having ill-conditioned covariance matrices. How to make it faster?

I'm using Mathematica 9.0 to fit multidimensional observations with a gaussian mixture. To do so I first adapted these steps to ensure that the mixture parameters are well defined (see ...
296 views

### Can ParametricNDsolve be used for coupled PDEs with 5 parameters?

I have a system of coupled PDEs with five parameters that I only know ranges for rather than explicit values, and I was wondering if I could define a parametric equation with ParametricNDSolve and ...
195 views

### Render dynamic Graphics objects static

As was discussed in the comments of another question (MathLink Graphical Output (Plots) to File), Graphcis objects produced by commands such as ...
168 views

### How to format the data in a table to have only numbers

This question is in continuation of my earlier query, how to store output of a function in a table for future use. I am able to store the output of my function in a table, however the table consists ...
1k views

### Why does Simplify[b-a] give -a+b and not b-a?

Simplify[b - a] results in -a + b. I prefer b - a, which is a bit simpler (3 symbols instead ...
138 views

### Determine types of input, output and internal variables in compiled functions

I am trying to speedup the computation of a longer function using Compile. For illustration consider the following short example: ...
957 views

### How to obtain the orthogonal matrix that diagonalize a symmetric matrix [closed]

I have a real symmetric matrix H which is in symbolic form, I need a matrix P that can diagonalize H; also P is orthogonal and its columns are the eigenvectors of H. How can I doing this in ...
137 views

### Using IntegerPartitions for distinct integers

What I would like to do is to find a way to test how many ways m distinct integers from the set {1,..., n} where ...
223 views

### 2D Fourier transform of a table - ArrayPlot issue

Recently, I have encountered an issue with ArrayPlot after performing a Fourier transform of a table. Picture presented above is an ArrayPlot of a 2D table. Using Fourier on this 2D table I obtain ...
259 views

### Resizing graphics with an inset when exporting

I am generating a number of graphics using Mathematica that contain text. Adding the text to the graphic has been a considerable challenge, but I have finally come up with the following: ...
47 views

### How to add a subplot in corner of plot? [duplicate]

How is something like the plot with subplot shown in this image achieved with Mathematica?
36 views

### Adding Elements to a List of Lists [duplicate]

I'm trying to do the following: Given a function f[x,y], I want to turn the list {{x1,y1},{x2,y2},...,{xn,yn}} into ...
69 views

### Converting a BSplinecurve to function

I am having two set of data. This is d000 and d001. The set d001 is a subset of d000. I am fitting the d000 data by using the BSpline of the d001 data according to the following commands: ...
128 views

This is a simple C++ program to send an expression to the_Mathematica_ Kernel and get its response. ...
495 views

### Multiply each element of an array by another array?

I would like to multiply an array by each element of another array, and am having a lot of trouble finding a built-in or automated method of doing. Here is an example of what I'd like to achieve: ...
375 views

### Fast way to get positions of “boxed” array elements?

Given a 2D array (arbitrary numeric / evaluates to numeric elements, simplified for examples, and can be arbitrary dimensions so long as the operation makes sense, I'm working with 2K X 2K in my ...
321 views

### If/else re-evaluate (integer only solutions)

I am trying to get Mathematica to do an if/else loop. I can get as far as the if, but I would like it to re-evaluate until only integer solutions are found. Here is what I have: ...
190 views

### Using Array Elements as Function Arguments

Suppose I have an array p = {a,b,c,d} and a function f that takes a variable number of arguments. I want to evaluate ...
202 views

### Defining an anonymous function using another function but with fewer arguments

In MATLAB you can use an anonymous function with another function to define a new function with fewer arguments as long you define the excluded argument before, e.g. ...
816 views

### Evaluate function of two variables using nested Do loops

Is there a more efficient way of evaluating a function of two variables on a rectangular grid the the following nested Do loops? ...
253 views

### Is there a function which instantly tells you whether an element is part of a list?

I have a very long list of numbers and I want to check whether there's a function (something that would look like PartOfQ[element,list]) that tells you immediately ...
70 views

### Markup of CDF file, e.g. highlighting text

Is it possible to markup (i.e. highlight or underline) text in a deployed cdf file and then save it? I think I know the answer (no), but since it seems a basic necessity for a document format that ...
119 views

### Using Graph to cull correlated lists

I have a set of lists that represent molecular descriptors. I need to identify which descriptors are highly correlated and eliminate the correlated pairs. I can represent the connectivity by ...
212 views

### How to apply a conformal map to a jpg (or other image)

I would like to apply a conformal map to a jpg. For example, the map $z\mapsto z^2$ to this image: http://thumbs3.ebaystatic.com/d/l225/m/mGyeriV7l-YArkeBd9oMUng.jpg Any help on how to do this?