0
votes
3answers
258 views

Matrix Determinant

I have an N by N (N>3) matrix generated from fortran. I would like to find determinant of that matrix using mathematica? I could do this for a 3 by 3 matrix. I can also import the fortran output file ...
26
votes
3answers
2k views

Creating a 2D meshing algorithm in Mathematica

As what is proving to be a difficult, but entertaining task, I am attempting to adapt a 2D meshing algorithm created for MATLAB and port it to Mathematica. I understand meshing functions already exist ...
5
votes
1answer
189 views

Normal Plot (visual test for normality)

I wish to construct a Normal Plot to visually test for normality of data. My data is: {188,199,171,200,219,172,235,194,234,206} And needs to be plotted to look something like this: Whereby ...
1
vote
1answer
426 views

Finding numerical/analytic solution to a derivative

Consider the following system of equations, with 11 dependent variables: ...
9
votes
2answers
276 views

Problem with PlayerPro recognizing a proprietary package

This question follows on from my earlier question Can Wolfram's Player Pro Use Proprietary Packages. That question appeared to have established that, yes, PlayerPro can use proprietary packages. ...
1
vote
1answer
239 views

Wolfram Workbench problem with JLink

I'm working on Wolfram Workbench 2.0 and I'm creating a JLink Application project. Below there is the code: ...
2
votes
1answer
148 views

Combining two notebooks

I have a notebook which contain all the variables and defined functions. I want to do two tasks. As an example, I want to find the density and energy which have equations in terms of above mentioned ...
10
votes
1answer
140 views

Why are some option values symbols, other strings?

Is there a rationale, beyond historical accident, why some Mathematica option values are strings, while others are symbols? It seems natural that some value spaces, e.g. named color schemes, are so ...
0
votes
1answer
374 views

Is it possible to modify the tick marks in BarChart plot?

I need to specify the length of the tick marks on the x axis in a BarChart plot: ...
1
vote
1answer
91 views

How to programmatically comment out multiple source files?

How to programmatically comment out the entire content of multiple .m source files assuming they start with correct Mathematica syntax? I need it to be robust so ...
0
votes
1answer
63 views

how to generate functions with changing array size?

I want to write a function in Mathematica which has two inputs 'n' and 'd', and the output should be (in Latex notation) $$F(n,d) = \sum_{i[1],...,i[n] =0; i[1]+...+i[n]\leq d}^{d} C[i[1],...,i[n]] ...
5
votes
1answer
550 views

Multinomial logistic regression

Has anyone done multinomial logistic regression in Mathematica? The binomial case is essentially done on the LogitModelFit documentation page and works fine. I am ...
2
votes
2answers
171 views

Illustrating half life

I'm teaching some lessons on negative exponents and one application listed was half life since the rate of decay can be written as 2^-1 every __ years. I found this nice animation on the net. ...
10
votes
3answers
1k views

Create triangular mesh from random list of points

I have a list of points. I would like to take these points and create a mesh of triangles from them, making sure triangles don't overlap. So here's a list of points: ...
0
votes
1answer
287 views

What is the correct way to use NIntegrate inside the FindMinimum function?

I'm having minor issues with the FindMinimum function when using NIntegrate inside. The functions work perfectly well but I get ...
2
votes
3answers
173 views

How to make a defined symbol stay in symbol form?

How to make a defined symbol stay in symbol form? w = 3; g = 4; {w, g}[[2]] 3 I want the output to be ...
4
votes
2answers
242 views

Sorting a matrix alphanumerically

Somewhat related to Sort matrix by columns and rows without changing them, but more general. I'd like to sort a square matrix (a 3 by 3 in my case, but surely the general solution will treat any), ...
1
vote
3answers
219 views

Tangent to a circle

I am trying to show vector of fixed length which is the tangent to a circle which rotates. Any suggestions on how to simplify this ? My question is not about using Manipulate etc but more is there an ...
1
vote
1answer
203 views

Which integration strategy to use for this product of polynomials?

What would be the ideal integration strategy for a function like this: $$f(x_1,x_2,\dots,x_N)=\prod_{i=1}^Nx_i^{c_i}\Theta(x_i-p_i)$$ where $x_i,p_i\in \mathbb{R}$, $\Theta$ is the Heaviside function ...
3
votes
2answers
184 views

Click on a curve to start Manipulating another function

I'm able to plot two lists with a tooltip on the curves to display the name of the curve: ...
1
vote
1answer
109 views

Can anyone identify these plots? [duplicate]

I need to produce some plots that look like these but I'm not sure what they are called in mathematica, can anyone identify them ? Update: I want to plot triples of the form (xvalue, yvalue, ...
2
votes
2answers
322 views

Why are these flow lines cut short?

I want to plot some flow lines for a certain vector field, but Mathematica doesn't seem to plot the entire flow line, only a small piece of it. How can I fix this? ...
2
votes
1answer
783 views

NDSolve two PDE plus one ODE, together

I have a couple of PDE (time and space/length) that are correctly managed by NDSolve, but to which I’m adding an ODE on which the acc “accumulates”, through time, a ...
12
votes
3answers
347 views

Impose the color for one discrete value above a color predefined gradient

If I plot an array with option ColorFunction -> "Rainbow" : ...
10
votes
3answers
501 views

How to remove unwanted regions in a three-dimensional surface

As the title indicates, I want to delete some unwanted regions in a three-dimensional surface created using ContourPlot3D. Here is the corresponding code ...
3
votes
1answer
321 views

Running postgresql query with backslash

I've been able to connect to a Vertica database, and also been able to run a SELECT query. But I'm not being able to run a query with a backslash in it. (Vertica has commands like postgresql.) The ...
3
votes
2answers
311 views

Combining two plots which are in two regions

I want to combine two plots which are in two regions. For an example, I want to plot following two figures in the same plot. ...
2
votes
2answers
105 views

Puzzling behavior produced by Exists

I need to simplify a set of solutions of a system, say for example: ...
4
votes
4answers
246 views

How can I name “a[[i]]” the parts of Table “a”? Or how to make Table “a” grow inside FindMinimum?

Let's say I want to minimize a function that uses a Table named a with the Conjugate Gradient Method of ...
2
votes
3answers
993 views

Phase space vector field [duplicate]

I have a system of non linear equations and from NDSolve I get the solution. I plot the phase space with ...
1
vote
1answer
166 views

The best method of constructing a product of consecutive terms

I am new to Mathematica, I am searching for a way to create an expression with a sequence of terms such as: (x-1)/x (x-2)/x (x-3)/x (x-4)/x … (x-n)/x
1
vote
4answers
388 views

ListPointPlot3D seen from above

I have a couple of {x,y,z} points a = {{0, 1, 0.}, {50, 1, 0.018931}, {100, 1, 0.02}, {0, 2, 0.}, {50, 2, 0.131}, {100, 2, 0.2}}; and I'm visualizing them with ...
3
votes
1answer
154 views

Problem with | operator in pattern matching

My first question here as I only got into Mathematica programming recently. Basically I have a large symbolic algebraic expression where I know certain variables with head pε appear with degree 2 in ...
-5
votes
1answer
292 views

plotting an equation with double summations

Thank you so much for the helpful comments. Now able to manage to plot all the functions. ...
7
votes
1answer
572 views

Compiling 64bit MathLink code under cygwin on Windows 7

I am aware that building MathLink executables is not without its challenges. However, I am trying to compile the MathLink example 'addtwo' from a makefile within cygwin on a 64 bit Windows 7 machine. ...
5
votes
2answers
270 views

How to dynamically update Locator[] constraints?

I need to visualize Menelaus' theorem for a triangle with moving locators for each of six points. So the vertexes of the triangle can move in any possible way, and the three points on the sides of the ...
4
votes
0answers
81 views

Is there a way to check whether two notebooks share the same variables?

When I code in Mathematica, I often re-use code from old notebooks which fulfilled a specific purpose; for example, one testing for soft matches in strings, or one that identifies outliers on a graph ...
0
votes
1answer
896 views

DSolve fails to solve second order PDE

I have a very simple example of a second order PDE: eqn = D[u[x, y], x, y] + u[x, y] == 0; sol = DSolve[eqn, u, {x, y}] and Mathematica cannot solve it! What is ...
1
vote
3answers
117 views

Placeholders for map inside a map

I have a list structured like list1 = {{"header1","header2","header3"}, {0,1,2}}; and I'm using a custom function to find the number of the column with a ...
1
vote
0answers
47 views

How to insert expression matching the format?

I would like programmatically to insert/write an expression at the current insertion point, but matching the current format, such as font size and style, so that it looks like the user typed it. ...
1
vote
1answer
634 views

Extract attribute data from an XMLElement

I'm trying to come to grips with parsing an XML file but I'm having difficulty working out how to extract specific attribute data from an XMLElement. Sample XML file below: ...
0
votes
1answer
280 views

Automatically shrink stretched images back to their original dimensions

We all sometimes find images on the web that are carelessly stretched to larger dimensions than original, which results in nothing but a reduction of the detail / dimensions ratio. See Original vs ...
0
votes
1answer
205 views

Dynamic boundaries for FindRoot

As documented FindRoot[f[x], {x, xs, min, max}] searches for a solution, stopping the search if x ever gets outside the ...
4
votes
1answer
1k views

How can I draw the transition diagram of a Markov chain?

I apologize for my heaviness as I am a Mathematica novice. Is there a kind soul who can tell me how to draw diagrams like those shown on page 158, 160 and 161 of this document.Chaine de Markov I ...
5
votes
3answers
530 views

Parameters for the CIE XYZ Color Space in Mathematica

In Mathematica, producing a color based on its RGB parameters is easy; one can use (for example) ...
3
votes
2answers
545 views

Adding and subtracting from elements in a list

I'm trying to solve an aparently simple problem. Given a list of length n, {a1,b1,c1,d1...} I want to perform two simple ...
8
votes
2answers
1k views

How to approximate a given WAV file with trigonometric series?

I'd like (together with a few people) to prepare a presentation about Fourier series for middle/high school students. I thought it might be quite cool to play a violin sound from, say, a WAV file, ...
9
votes
1answer
484 views

Modular arithmetic - efficiently calculating the remainders of factorials

When working on this question regarding the divisibility of the sum of factorials, I decided to write some code to test "small values" of the problem using the following code. ...
3
votes
2answers
1k views

Define a color function using Piecewise

How can I define a ColorFunction for my ContourPlot using Piecewise? For example after ...
3
votes
1answer
443 views

Adjacency List representation of a graph

I am looking to draw a graph knowing a simple adjacency representation of the graph like: A = {{1, 3}, {2, 3}, {3, 4, 5}, {4, 5}, {5}} Where ...

15 30 50 per page