0
votes
0answers
31 views

Reset Options to Default [duplicate]

It is straightforward to set the options of a given predefined function. E.g., SetOptions[ Interpolation, InterpolationOrder->1] I would like to know if there ...
3
votes
1answer
155 views

How to access timings of each individual test in a TestReport?

I want to know how long each VerificationTest took to complete in the test report, so see which one was the longest and do some statistics on them: ...
3
votes
1answer
63 views

Contourplot fails to plot x==0 if plot range is from 0

The simple command ContourPlot[x == 0, {x, 0, 1}, {y, 0, 1}] fails to plot the line x==0. However If I add a small buffer it ...
1
vote
1answer
228 views

NDSolve There are fewer dependent variables, {V[S,t]}, than equation

I am trying to solve the BlackScholes PDE for Barrier option. It works fine for european barrier, but errors out on american boundary condition ...
2
votes
2answers
53 views

Join data imported in different variables [closed]

I've imported data from Excel into several variables and I would like to join all data in one "big" variable. I seem to have a problem when one variable contains numerical data... ...
0
votes
1answer
100 views

Plotting the tangent of a curve [duplicate]

I'm new to Mathematica and this is probably child's play for most people, but I wanted to know how to plot the tangent of the function below at the point e=1/4 : <...
3
votes
1answer
82 views

Manipulate with a function as a parameter

I'm trying to make a Manipulate command to plot the contour lines of a function of two variables $f(x,y)$. I think I should use the "InputField" option somehow, and I thought of something like this: <...
0
votes
1answer
69 views

Removing imaginary and negative results from Solve

I have been trying to solve a series of equations that I know have real positive values for the unknowns (they all have real world analogues and they are not linked to a frequency domain) but despite ...
12
votes
1answer
604 views

What function generates random numbers in a compiled function?

I am writing a simulation for 2D random walk. I wrote several version of code, and found that the speed is like this (fastest to slowest): C++, Mathematica compiled procedural code, Mathematica ...
2
votes
2answers
173 views

MaxValue of a periodic function

I want to find the maximum of a periodic function on the interval [-Pi,Pi]. What I tried is the following: ...
25
votes
2answers
806 views

Dataset vs an association of associations

Associations with a record structure (e.g., a flat table) can be organised in one of two main ways. First as a list of associations, which is also used in the case of Mathematica's data set ...
6
votes
3answers
281 views

Limit of Nested Radical $\sqrt{1+\sqrt[2!]{2^2+\sqrt[3!]{3^3+…}}}$

I want to find limit of infinite nested radical $\quad \quad \sqrt{1+\sqrt[2!]{2^2+\sqrt[3!]{3^3+...}}}$ but I don't know how to define this expression in Mathematica. How can I define it and ...
1
vote
1answer
148 views

Multiplying three matrices does not give expected form [closed]

I'm having lectures on analytic geometry. I've learned that there is an associated matrix multiplication for a quadratic form: $\quad \quad \left( \begin{array}{ccc} x & y & 1 \\ \end{array} ...
1
vote
1answer
175 views

Adding letters and numbers to create a variable name [duplicate]

Let's say I have several variables, named R1, R2 and R3. I wanted to have a function ...
7
votes
2answers
431 views

Need help with the Lagrange multiplier method

Well I am new to Mathematica and got really stuck solving this problem. In class, I was ask to use the Lagrange multiplier method to find the maximum and minimum value of $f(x,y) = x^2+y^2$ which ...
3
votes
2answers
105 views

Demonstration Confusion

What is the proper way to open a Demonstration in Mathematica so that the code is visible and can be evaluated from the Evaluation menu, as though I had created it myself? Explanation: When I ...
11
votes
5answers
247 views

Tidy form of numbers with errors using ScientificForm

Say I've computed something and got a number 0.02112398 with a computed error: 0.000331 Formatting it with ScientificForm[0.02112398 \[PlusMinus] 0.000331] gives me:...
1
vote
2answers
91 views

Ask about the variable and constants in partial derivative in a loop

EDITED I have a function in a list like : func={2(x^2)+x*y+3(y^2)}; I want to have a UI that ask me which parameter (x or y) is a variable in a ...
8
votes
3answers
404 views

String matching balanced pairs of braces

I am trying to extract from a string in Mathematica all instances of \newcommand{ABC}{DEF} Where ABC and ...
2
votes
2answers
82 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 ...
2
votes
0answers
51 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 ...
0
votes
1answer
63 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 ...
3
votes
1answer
89 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 ...
6
votes
2answers
249 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 ...
3
votes
1answer
2k 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? ...
14
votes
1answer
311 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 ...
0
votes
0answers
82 views

PDE with Laplacian time derivative term [duplicate]

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 ...
0
votes
2answers
114 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 ...
1
vote
2answers
67 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: ...
0
votes
1answer
151 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 ...
1
vote
0answers
108 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 ...
9
votes
1answer
262 views
4
votes
3answers
154 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: ...
1
vote
0answers
106 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) ...
4
votes
1answer
267 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?
1
vote
1answer
528 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.
1
vote
0answers
81 views

NDSolve : Solve a single variable-coefficient ODE as series of constant-coefficient ODEs [closed]

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. ...
0
votes
1answer
104 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: ...
0
votes
1answer
71 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 <...
1
vote
0answers
113 views

Custom Head for Encapsulation

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 ...
6
votes
1answer
128 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: ...
5
votes
4answers
657 views

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

___________________ FOLLOWUP TO THE QUESTION : _____________________ Does anyone know how I could quantify the thickness of the spiral AND the thickness of the empty space between the arms? I know ...
4
votes
2answers
215 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 <...
14
votes
2answers
647 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 ...
2
votes
0answers
34 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 ...
4
votes
1answer
93 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 ...
0
votes
1answer
105 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 ...
0
votes
2answers
49 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 ...
1
vote
1answer
47 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 ...
1
vote
0answers
58 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 ...

15 30 50 per page