2
votes
2answers
33 views

Pull out scalars from NonCommutativeMultiply in commutator of SU2 spin algebra

I am trying to work on spin chains in Mathematica. That is, N spin-1/2 on a one-dimensional lattice with periodic boundary condition (N+1=1). I need therefore the SU2 spin algebra $S_z, S_+, S_-$ with ...
1
vote
1answer
27 views

Plots are clipped randomly (almost)

I am experiencing a strange behavior in plotting a lot of functions. Basically, they are clipped within an horizontal range. Let try to run this code by varying nmax, it could be a problem of my ...
1
vote
0answers
5 views

How to pass options to ListPlot when using a DataSet?

Still learning the new DataSet feature, I would like to create a ListPlot where the color of the points is to be determined by a ...
1
vote
0answers
14 views

Problem with series expansion and integrate

I have the following very simple code. A power series in a-parameter, function f[x], is integrated with respect to x, and the ...
0
votes
0answers
10 views

Replace part in a matrix that matches specific pattern

I have the following problem. Given a matrix L which looks as follows, Matrix L is a link, route matrix. Further, I got the following vector (d), which indicates the demand per vertex combination. ...
0
votes
0answers
10 views

Simplification of a complex-valued expression with purely real components

(I'm including all the information here, as I'm not sure how much of it is necessary to solve the problem. For a tl;dr skip to the bottom) I've been working on a problem involving calculating ...
1
vote
2answers
43 views

Solving Differential Algebraic Equations as BVP

I am trying to solve a set of DAEs. \begin{equation} -4 \nu (\lambda(s))^{(-1 - 4 \nu)} \theta'(s) \lambda'(s) + (\lambda(s))^{(-4 \nu)} \theta''(s) = -\alpha_y \cos\theta(s) + \alpha_x ...
0
votes
1answer
32 views

Mathematica multi-dimensional numerical integration default method

I'm performing multidimensional Numerical integrations with mathematica I was wondering what was the default method that mathematica was using. Also i'm changing some parameter inside the integration, ...
9
votes
2answers
2k views

How to discretize a nonlinear PDE fast?

I wish to numerically solve the following PDE. Although there are some complete discussions for solving PDEs in tutorial/NDSolvePDE, there is no hint for the nonlinear case by discretization. Thus, I ...
2
votes
3answers
45 views

Manipulating array

I have got an array like this: A = {{{1, 4, 5}, {3, 7, 15}}, {{5, 6, 9}, {7, 8, 2}}, {{9, 10, 1}, {11, 12, 3}}} I make differences in each sublist a following ...
3
votes
1answer
90 views

How does Mathematica use system environment variables?

Is there a common way in which environment variables are accessed, stored, or used by the kernel? There are built-in functions for querying and setting vars in the system environment, but there are ...
0
votes
0answers
12 views

How to edit style sheet files?

I edit $UserBaseDirectory/FrontEnd/StyleSheets/mystyle.nb and press Cmd+S, but there is a beep indicating the file can't be saved. I then close and restart ...
1
vote
0answers
11 views

Code/Exp Search Documentation Center Mathematica

I have added several of my own applications to my Mathematica documentation center. Currently Mathematica uses followings notebook options to help the user search for specific functions. ...
2
votes
2answers
101 views

Coordinate free differential forms package

I am looking for a package in Mathematica which can handle differential forms in a coordinate free manner. I am aware of several packages which do differential forms, but it seems that for all of them ...
1
vote
2answers
37 views

How do I check to see if two expressions are equal?

This is what I am trying: (2 x - 2 Sqrt[x (x - v)] - v)/(2 x + 2 Sqrt[x (x - v)] - v) == (Sqrt[x] - Sqrt[x - v])^4/v^2 but it's not working. Can someone tell me ...
0
votes
1answer
16 views

Copy files existing in different directories under the same directory

I have many files existing in different directories, I need to copy it under the same directory. Any suggestions?
0
votes
0answers
9 views

WSMModelData Error

I am getting this error message when I run simulation in Mathematica that makes iterations to a SystemModeler model. ...
6
votes
3answers
107 views

Ovals of plane curves (and esoteric surfaces in space)

Consider the curve $y^2 - x^3 + x=0$ with $x, y$ real. This curve has two connected components (one bounded, one not), and the question is: how do you get Mathematica to tell you that (if you do: ...
1
vote
2answers
62 views

Calculate expected value of piece-wise pdf

I have the following PDF of a random variable: $f(x)=\begin{cases} 1 & \text{if}\ \ \ 0<x<\frac{1}{2} \vee 1 < x < \frac{3}{2}\\ 0 & \text{otherwise}. \end{cases}$ How can i ...
0
votes
0answers
12 views

Why choosing small values of Alpha and Beta gives inefficient Runge Kuttan method [migrated]

I have been trying my hand at a past exam paper and one of the questions is as follows: The second-order Runge-Kutta method to solve the equation $ \frac {dy} {dx} = f(x,y)$, $y(x_0)=y_0$ at the ...
0
votes
0answers
22 views

Change in direction when a line hits an ellipse?

I'm trying to simulate reflecting light off an elliptical mirror. I currently store the ellipse in the form {center,{radii},rotationAngle} and the ray of light is ...
4
votes
2answers
63 views

Find the nearest locations for multiple points

Assume that there are many holes with their locations fixed, and the same number of balls distributed randomly. What is the smallest total distance for the balls fitting into the holes on the ...
0
votes
1answer
25 views

Right data format when EmpiricalDistribution expects “Rectangular Array”

I have the following code to generate random data (these are the eigenvalues of a non-central Wishart matrix, and I am interested in their distribution). ...
12
votes
6answers
474 views

How can I evaluate only a single step of a recursive function?

Let's say have a simple recursive function for the Fibonacci sequence f[0] := 1 f[1] := 1 f[n_] := f[n - 1] + f[n - 2] but I want to see how it will expand in a ...
3
votes
1answer
143 views

3D Plot of The Riemann Zeta Function

I am a new user and i would appreciate your help to visualize the 3D of the following function. Edit I tried this ...
1
vote
2answers
52 views

Replace list of symbols in an expression

I have an expression: exp = a+b+c and a list containing all the symbols of my expression: syms = {a,b,c} and I would like ...
5
votes
6answers
130 views

Trying to write out the prime factorization of a number with CenterDot and Superscript

I am trying to use CenterDot and Superscript, in conjunction with Apply to write out the prime factorization of any given integer. Everything works well UNLESS the prime factorization of the number ...
0
votes
0answers
74 views

NMinimize ignores constraints

I have a problem with NMinimize - I try to minimize quite a complicated function and use a couple of constraints (the way it is shown in the documentation). Now, ...
0
votes
1answer
46 views

Exclude Infinite Value in Table

I'm creating a plot of a family of lines using their endpoints and plotting it like so: Graphics[Line[Table[{{x1, y1}, {x2, y2}}, {u, 0, 2 \[Pi], ustep}]]] Where ...
1
vote
2answers
81 views

How to select states with equal times

Can anyone show me how to select the states that have equal times-dates. For example, i have two time series. First that have 10 observations, say from 2014/10/1 to 2014/10/10, and second that have 7 ...
2
votes
2answers
48 views

Partial application of MapThread

Suppose that I have f[a_, b_, x_] := ... I'd like to create a list of n pure functions ...
2
votes
2answers
54 views

Simplifying vector expressions

I have some code that calculates Jacobians, but the results contain terms that should simplify or cancel out, but I'm not sure how to achieve this. My code looks like ...
0
votes
1answer
38 views

Zoom settings other than 50% 75% 100%, [duplicate]

Is it possible to choose a zoom setting other than what's provided at the bottom of each Notebook window (50%, 75%, 100%, 125%, 150%, 200%, 300%)?
0
votes
1answer
52 views

Where can I find a good tutorial for stochastic modeling using Mathematica?

I am a newbie in Mathematica and I aim to use Mathematica mostly for stochastic modeling (to develop and analyze models in evolutionary biology). Note that I am not necessarily a great mathematician ...
0
votes
0answers
39 views

how can I 3D-plot multiple segments [on hold]

I have a list of many 3-D line hundreds segments consisting of multiple points such as ...
1
vote
1answer
36 views

How to increase the font size in PlotMakers

When I use PlotMarkers -> {\[FilledCircle], 40} in ListPlot I get something like this: How can I increase the font size of ...
1
vote
1answer
100 views

What is the PDF of a variable where a parameter is itself a random variable?

Question How do we analyze in Mathematica cases where a parameter in a Probability Density Function (PDF) varies according to another PDF? Consider the following example... Example The text below ...
0
votes
1answer
36 views

How find solve the equation complex conjugate? [on hold]

Tried solving it with every function I know but couldn't z*=z^2
1
vote
1answer
58 views

Strange integration

I tried to evaluate this line Integrate[((-I/2) (E^((-I) x) - E^(I x)) + ((E^((-I) x) + E^(I x)) x)/ 2)/((-1 + E^x) x), {x, 0, Infinity}] Then I get $14$ ...
-3
votes
2answers
66 views

How to create a graph from the given data

Good day! I would like to know how to create a graph from the given data : ...
0
votes
2answers
37 views

Change the colour scheme in DensityPlots to make the zero white

We are trying to plot a density plot using the TemperetarueMap colour scheme. However, we don't seem to be able to make the white colour correspond to the value zero of the function we are plotting. ...
1
vote
3answers
254 views

Partial fraction decomposition of $1/(e^x-1)$

This link has discussion on finding partial fraction decomposition of $1/(e^x-1)$, so I experimented with Mathematica to see if M can do it, but looks like not. Similar is the case with one more CAS I ...
1
vote
2answers
75 views

Can I regroup terms into a sum?

Is there a way to regroup terms into a sum? I mean, for example, if I have the sequence $\quad \quad S_1 S_2 + S_2 S_3 + S_3 S_4 + S_4 S_5$ I would like to get the form $\quad \quad {\rm ...
0
votes
0answers
24 views

How to use a Butterworth bandpass filter to generate a chirped signal

As there is no ChirpSignal function in Mathematica, I wrote a simple code to generate a sinusoid with a frequency that changes continuously from frequency ...
5
votes
2answers
223 views

How to generate a chirped signal

As there is no ChirpSignal function in Mathematica, can anyone tell me how to write a custom function to generate a sinusoid with a frequency that changes ...
37
votes
3answers
3k views

Image processing: Floor plan - detecting rooms' borders (area) and room names' texts

Here is a simple building floor plan. I would like to derive the rooms as (rectangular) components and the names of the rooms. This is very common representation of building floor plans. The ...
1
vote
1answer
33 views

simplifying the range of two definite integrals

Today, I tried to obtain the solution of the following equation, sol = DSolve[ {m v'[t] + \[Gamma] v[t] == \[Xi][t] , v[0] == v0}, v[t], t] The solution, of ...
1
vote
0answers
26 views

C compiler error: the no library could be generated error

I have windows 8, Mathematica 9, and I've just installed Microsoft Visual Studio 2013 with update 3. I'm try to run Compile with the option ...
-1
votes
1answer
55 views

Uniform distribution on unit circle

I need a uniform distribution on the unit circle (x; y) : x^2 + y^2 <= 1 with the density f(x) = (2/Pi) Sqrt[1-x^2] ...
1
vote
0answers
31 views

Why the function cannot achieve the expected result?

Today, I write a toy code (Framed the prime in a list) to practice Mathematica programming ,which as shown below: Trail 1: ...

15 30 50 per page