# All Questions

37 views

### Error message: ArcTan called with 0 arguments; 1 or 2 arguments are expected [closed]

sol = NDSolve[{y'[t] == E^t ArcTan[t], y[0] == 0}, y, {t, -100, 100}] Am I blind? What is wrong here?
61 views

### Sum broken into two sub-sums according to a condition on the terms

I have a sum in mind, but I want to break it into two sums and get a separate total for each of the two. All cases where the square root is accurate, i.e., exact All cases where the square root is ...
43 views

### FourierTransform of a gaussian at -1 and 2

Let ft[w_] := FourierTransform[Exp[-t^2], t, w] Then ft[#] & /@ Range[-2, 3] Evaluates to ...
25 views

### Transpose four lists of data into two lists for use in List Plot [closed]

I have four lists of data x1 = {1,3,5,7} y1 = {0,2,4,6} x2 = {10,12,14,16} y2 = {8,10,12,14} In one line is it possible to use transpose to get two lists which ...
69 views

### Eigenvalues function not producing expected results?

I'm running into a strange issue when trying to compute eigenvalues of a 2x2 matrix for graphene. If I "manually diagonalise" by multiplying the two off-diagonal terms together and taking the square ...
200 views

### Curvature Application

I found these amazing animations at https://courses.engr.illinois.edu/tam212/avt.xhtml#avt which I think will be wonderfully useful when teaching multivariable calculus next semester. I've started to ...
53 views

### Switching ArcTan argument from a sequence to a list

The objective is to determine the angle formed by the line connecting two points in the plane, say p and q. The ...
31 views

### Turning something into a form that can be used as C code [closed]

I have a function F[x_]:= SOMETHING and I want to use it in a C code. Is there any easy way of doing this? Examples For functions like Log or sqrt, it could use the math library, for special ...
50 views

### Multiple lines in an If statement [closed]

What I am wondering is how do you perform multiple lines when using the If statement. I know the following is not proper Mathematica code, but how would I do this in Mathematica? ...
148 views

### What's wrong with Simplify and FullSimplify?

I have a quite complex list of equations and inequalities I combine to a boundary condition for my cost function. After investigation of two days I found the bug (I really name it a bug!). One of my ...
62 views

### PDE with Laplacian time derivative term

Using Mathematica 9 I am trying to solve the 2D PDE: c1*Laplacian[-u[x,y,t],{x,y}] + c2*D[Laplacian[-u[x,y,t],{x,y}],t] == 0 (Eq.1) with time-dependent Dirichlet ...
84 views

### Examining the equations of a Differential Op Amp

I want to examine the equations of a differential Operational Amplifier, specifically I want to examine how the tolerances of the resistors affect the resulting differential gain and common mode ...
60 views

### How to tell Mathematica that a limit converges to a product of two variables

I have looked through the manual and Im simply just stuck trying to make Mathematica solve this: ...
42 views

### NDsolve with discontinuous non-numeric PDE coefficients

I want to solve the heat diffusion equation with variable thermal conductivity. So I have the following code ...
26 views

### Method used by NMaximize with a binary linear problem

I'm using Mathematica 7's NMaximize to solve a linear programming problem with thousands of 0/1 integer variables, thousands of linear constraints and a linear target. I suppose I could use ...
171 views

### Finding skewness and kurtosis numerically in Mathematica

I have a function given by ...
125 views

### How to get multiplication of the elements of a specific list/Matrix

Assume there is a list: List1={a,b,c,d}; Then I want to get these calculation: ...
46 views

### Change only tick labels while keeping default ticks [duplicate]

Consider the following Plot3D (although the same question might be asked for the 2D case) ...
139 views

### Where I can find the CD version of Stan Wagon - “Mathematica in action” 3rd ed. book?

I've just started my license and I need the code to focus on implementing my programs. I can't make the code in the book run. Can anyone help?
38 views

### How to change the position of the PlotLabel? [duplicate]

PlotLabel positions the label on top of the plot by default. I would like to put it below the plot. How can I do that? Thank you.
37 views

### NDSolve : Solve a single variable-coefficient ODE as series of constant-coefficient ODEs

I have a manipulator equation of the form: $M(q){q''} + C(q,q')q'+G(q) = {0}$ where $M, C$ are $6$ x $6$ matrices, and $G, q$ are $6$ x $1$ vectors and $q$ a function of time. ...
31 views

### EdgeForm with Graphics

I want my figure to have an edge and I am playing around with EdgeForm[Thick], putting it in different places. My figure is: ...
56 views

### Small difference between large numbers [closed]

I would like to calculate the difference of the two large numbers, which are close together. See here my (sorry, quite long) code: ...
50 views

### Obtain constant from DSolve [closed]

I need to extract constant C[1] from expression which I get when solve equation. i.e. DSolve[y'[x]==1/(2x),y[x],x] In result Mathematica gives me this one ...
53 views

Often when I'm writing a project in Mathematica, the number of arguments I must provide to functions spins out of control. I need a sort of object-oriented encapsulation approach. I've already had a ...
76 views

### Is there an elegant way of delaying evaluation of A==B when calling a function that uses this pattern

Suppose I wanted to define a number of functions that accepts expressions of the form: ...
419 views

### How to create a thick spiral then extract the coordinates from the image?

I can plot a thin spiral using just: $r=\frac{\theta }{2 \pi };$ PolarPlot[theta/2 Pi,{theta,0,2 Pi}] but is there a way to plot a spiral that has actual area ...
98 views

### Find the area of a contour surface plotted by ContourPlot3D

I am looking for a way to find the surface area of a contour from ContourPlot3D. Here is an example where I might like to find the area of the contour surface to ...
76 views

### How to efficiently compile this function? It involves a 3-index Table [on hold]

Consider a 2-dimensional lattice with LxL sites. Each site has 4 neighbors, and we can then define a function (called below ...
42 views

### Plotting complicated function with not exactly defined angle [closed]

I want to plot the time-averaged electric energy density near the focus according to Boivin and Wolf. Now I have my three intensities. I am very new to Mathematica and my problem is that I can't ...
221 views

### Trainable WEKA segmentation of images

Is there a Mathematica equivalent of Trainable WEKA Segmentation as implemented in Fiji, the image processing software? A Google search did not return any relevant links. I attach the original image ...
30 views

### How to get simultaneous eigenvectors of commuting matrices? [duplicate]

So let's say there are two square matrices A and B that commute (AB-BA=0). This implies that there must exist some complete set of vectors that are eigenvectors of both A and B. Is there any way to ...
74 views

### What options need to be set for Simplify to perform a certain manipulations similar to FullSimplify?

Simplify performs algebraic transformations and is fast, while FullSimplify tries a wide range of transformations involving ...
56 views

### Evaluate NDSolve within NDSolve

So I am attempting to solve a differential equation which includes a differential equation (i am not sure if this why my code is giving problems). I am pretty sure that everything is as its supposed ...
53 views

### OLS Estimation - Computational results vs. calculation by hand [closed]

I calculated the OLS estimators for a data set by hand using $$\hat\beta=(X^TX)^{-1}X^Ty$$ If I check my results with Mathematica I get different results. I'm quite sure that I didn't make any ...
31 views

### How to get Complement function working in a For loop? [closed]

I've been working on a piece of code that will delete small components from a nested uneven matrix (n pages, n rows, 3 columns), by deleting the pages with less than ~30 rows. However, I've notice ...
34 views

### Can I rely on the ordering of the adjacency matrix? [closed]

Suppose I have created a Graph[{1,2..n}, {1->3, etc}], and I take the adjacency matrix of that graph. Can I rely on the fact that the i-th entry in the graph is the i-th node in the matrix? Or maybe ...
43 views

### Does a matrix need to be rationalized when calculating MatrixExp? [closed]

I have a sparse matrix, L, and need to calculate its exponential, MatrixExp[L t], where t is ...
152 views

### Having trouble translating Matlab fsolve into Mathematica

I searched the site and found that someone said FindRoot is equivalent to fsolve, however, without proper options, ...
53 views

### Simple ways to implement vector dilation

Suppose we have a singly connected but not necessarily convex polygon. Something like shape = CountryData["Chad", "Coordinates"]. Is there a simple way to ...
56 views

### How to freeze and test a list of programs?

I have a list of problems for my students and I'm trying to use the new v10 feature TestResults like so: ...
35 views

I am trying to solve a system of differential equations. ...
132 views

### Import data from excel and store it permanently in notebook

I am trying to write the code for doing the following: by clicking a button, import specific data from an Excel file which I select through a dialog window; input a name for the imported data set ...
197 views

### Why don't the arrowheads show for this directed graph?

It's very weird, but the first graph is shown as undirected (dots connected by lines, not arrows. The second is shown as directed, with arrows. I'm using the cloud version of Mathematica. ...
53 views

### Assign values to parameters from a list/Matrix using GUI

Assume there is a list like: ma={{L1,r1},{L2,r2}}; I want to convert the ma to a GUI which asks me about the values of ...
29 views

### rgb2ycbcr and ycbcr2rgb performing twice on same image gives different answers? [closed]

I converted an image from rgb to ycbcr using rgb2ycbcr. Then converted back to rgb using ycbcr2rgb. Again converted the resulting image from rgb2ycbcr. But in the first and second rgb2ycbcr ...
31 views

### problem exporting an Animate video

Here's my code: ...
66 views

### Customized FortranForm output

Let's take the following example V = (-G*Mn)/Sqrt[x^2 + y^2 + z^2 + cn^2]; Vx = D[V, x]; FortranForm[Vx] The result is ...
A Seifert surface for the (3,4) torus knot is defined by the intersection of $S^3 \subset \mathbb{C}^2$ with the set $\arg(z^4-w^3)=0$. The boundary is at $z^4=w^3$ and this is the torus knot. Here ...