7
votes
2answers
209 views

Why does the name of a pattern affect the result of a transformation rule?

I was playing a little dirty, trying to get a template for defining a Curl[] operator. I wrote the following rule, which I knew was going to spit out a few ...
6
votes
2answers
409 views

How to properly handle mutual imports of multiple packages?

I'm new to the mathematica platform and I am developing a simulation framework as my first exercise and have been tearing my hair figuring how to make packages interact with each other. Ill explain a ...
13
votes
1answer
274 views

Evaluation indicator for a notebook

I have a GUI with a number of TabView and other Manipulate controls. Sometimes clicking from one tab view to the other can take ...
4
votes
1answer
784 views

How do I use the ShowLegends function to produce a legend for my framed graphic?

I'm new to this site and new to Mathematica as you can see from my question. I'm also new to programming, btw. I'm trying to produce a legend for my plot which I've coded as follows: ...
5
votes
1answer
581 views

CustomTicks and ListPlot - Can't seem to get them working

I have a very large list of numbers like list={{a1,b1},{a2,b2},...,{ai,bi}} where a1 ranges between 10^-9 and 10^-5 and bi varies between 0 and 100. I have ...
1
vote
1answer
795 views

Problem while solving system of two second order non linear coupled differential equations using NDSolve function

I am a completely new to Mathematica, and I am sorry if this question is dumb. I have to solve a system of two second order non linear coupled differential equations (that I got from the Lagrangian ...
10
votes
3answers
797 views

Derivatives (divergence, gradient, curl) of interpolated 3D data

How can I calculate a vector derivative (i.e. divergence, gradient, curl) of interpolated data? For sample data, you can use: ...
1
vote
0answers
202 views

Integrating over a region without singularity gives an error indicating the function has singularity in that region

I have the following 2D region over which I want to integrate a function: ...
13
votes
1answer
449 views

Visiting nodes in a tree bottom up

I have a problem that can be reduced to this one: Suppose I have an unbalanced (almost random) tree. The leaves of the tree have one property already set, and all vertex (including the leaves) have ...
10
votes
3answers
1k views

Manipulating the axis on a ListLinePlot

I am trying to create a plot using ListLinePlot in which the x-axis is represented in a logarithmic scale, and is reversed (so larger values are on the right side). ...
1
vote
1answer
210 views

Need help evaluating definite integral to a function of Y

Suppose $Y = \sqrt{2T}\cos(U)$, $ 0 \le u \le \pi $, and $ 0 \le \cos^{-1}(\frac{y}{\sqrt {2t}}) \le \pi ) $, so $ -1 \le \frac{y}{\sqrt{2t}} \le 1 $, with all $ \mathbb{R}$. The iterated integral ...
9
votes
2answers
2k views

FindRoot Domain restriction

I am solving a system of four non-linear equations in four variables using FindRoot. I have some sense of the relationship between the variables so I don't want Mathematica to do its computations in ...
1
vote
2answers
97 views

What is the default file path used by the Put function and how do I pre-evaluate an expression to use in Put?

I have a problem of trying to store some output in an external file. In one note book I define a function f[x_]:=AdvancedCalculation, where this function generates ...
16
votes
2answers
941 views

Higher order periodic interpolation (curve fitting)

I have a list of points in 3D, and I want to get a smooth interpolation or curve fit (it is more for illustration) of these points such that the first and second derivatives at the start and end ...
10
votes
1answer
433 views

Drawing dessins d'enfants (bipartite graphs subject to certain conditions)

I want to write a function which constructs all possible dessins d'enfants (bipartite graphs fulfilling certain criteria, given below) from a collection of data presented in the following form: ...
4
votes
3answers
322 views

Dynamic[] and Print[] [duplicate]

Possible Duplicates: Intermediate display similar to PrintTemporary Estimating progress on plots How to create a progress bar? How to determine how much of a table is generated? I'm ...
3
votes
3answers
2k views

DSolve gives complex function although the solution is a real one

I have a problem with the DSolve[] command in mathematica 8. Solving the the following 4th order differential equation spits out a complex solution although it should be a real one. The equation is: ...
11
votes
1answer
349 views

How does Mathematica know my location?

On the AstronomicalData page in the online reference, it says for AstronomicalData["Sun", "NextRiseTime"] that it finds the ...
5
votes
14answers
1k views

Sum of Squares without multiplication

I want to sum the squares for a given number N from 1 without using Multiplication. Is it possible?
2
votes
2answers
150 views

Comparing elements of the $n^{\text{th}}$ sublist in a ragged list with the $n^{\text{th}}$ member of a sequence

I have a list of lists that are not of the same length (for example, {{6}, {14}, {6, 26, 30}}), but I have to compare every element in the $n^{\text{th}}$ sublist ...
4
votes
1answer
146 views

MapThread with several cells as output

Assume I have defined the following function: FF[{x_, y_}] := {x^2 + y^3, 3.5*x*y} I would like to apply FF on a list of ...
16
votes
1answer
2k views

How to demodulate an FM signal in continuous-time?

I'm not sure if this is a math or Mathematica question, but I'm posting it here because I'm interested in possible Mathematica tools/functions to solve the problem. I'm stuck. I want to simulate ...
33
votes
3answers
3k views

Calling MATLAB from Mathematica

How can I call MATLAB functions directly from Mathematica and transfer data/variables between the two systems?
15
votes
1answer
360 views

CountryData and the areas of the world

If I add the WaterArea and the LandArea of the world, I get the same number as if I asked for the total area of the world in the first place: ...
0
votes
1answer
125 views

Slow Dynamic Button Does Not Print [duplicate]

Possible Duplicate: Why do buttons with ChoiceDialog freeze the front end? Why is SystemDialogInput failing to return a save file path? Evaluation inside Button stops after some seconds I ...
8
votes
1answer
643 views

Improving the source-code indentation in Wolfram Workbench

One thing that I like about the more recent versions of the Mathematica front-end is that I think it does a good job indenting code. The language's functional nature, in my experience, leads to a lot ...
13
votes
2answers
973 views

Obtaining joint distributions and conditional distributions using Mathematica

I have two multivariate Gaussian distributions $p(x)$ and $p(z)$ with mean vectors $m_x$ and $m_z$, and covariance matrices $\Sigma_x$ and $\Sigma_z$. my model is a simple linear model $x = W z+n$ ...
16
votes
8answers
543 views

Applying And to lists of Booleans

I'd like to take {True,True,False} and {True,False,False} and apply And to get ...
3
votes
4answers
154 views

Pack Solve results into a vector

I am currently using a really easy function to get the eigenvectors of a corresponding eigenspace: ...
1
vote
1answer
104 views

How can I manipulate with elements inside sublists if sublists of different lenght?

I have some kind of output like this: {{1, 5}, {1, 13}, {1, 5, 25}}. I would like to be able to enter in each sublist and make sums of every two elements in sublists, for example my desired output ...
3
votes
2answers
95 views

How to uncompress only the compressed elements in a matrix

I have data in a rectangular structure – something like matrix={{a,b,c},{d,e,f},{g,h,i}}. The problem is that some of the columns consist of uncompressed data and ...
5
votes
6answers
311 views

Creating sums of elements from a list

I have a list $(d_1, d_2, .. d_k)$ and I want to create all sums that I get for adding only two elements for my list $(d_1+d_2, d_1+d_3,...d_{k-1}+d_k)$. The ...
2
votes
4answers
1k views

How to export data from For loop in text file?

I'm new in Mathematica and I am trying to write numbers from 1 to 10 in txt file. But "Null" is everything that is written in my file. The code is: ...
9
votes
2answers
120 views

How to force native styling of controls?

While preparing a dynamic module, I discovered a weird behaviour of Mathematica's controls when you rotate them: ...
2
votes
1answer
183 views

How do you define an affine transformation that is translated by itself?

This one should be simple, but I can't figure it out. I would like to define a transformation (function) such that $r$ maps to $m.r + r$ The help file on AffineTransformation says that ...
10
votes
4answers
714 views

Plotting a complex valued function over a circular region

I would like to apply some complex valued function to some region in the plane, say, a circle of radius $R$ centred at $k$. How can I do this?
8
votes
3answers
341 views

Where in the documentation can I find a list of function argument types?

Recently, I learned that it is possible to assign "types" to function arguments in the definition of a function. Suppose I have a function stringFun that does some ...
13
votes
7answers
364 views

Get the first element after the first sequence of length N of consecutively increasing values

I'm looking for an efficient way of extracting the first element after the first sequence of N consecutive elements in which the values are increasing. If these are the data of a toy example: ...
5
votes
2answers
333 views

How To Span Table Headings?

What I am doing wrong? I would like to get a header to the table and based on your code I tried this: ...
7
votes
1answer
533 views

How to map rotate, pan, zoom to manipulate controls

I am wondering if there is a way to restrict the motion of the rotate mouse cursor in when moving around a 3d plot. For example, I want the y direction of the cursor to correspond to pulling the z ...
13
votes
1answer
246 views

Problems with images caused by which stylesheet is used

Update This looks now like it was a bug in Mathematica version 8, because everything works as expected - at least for this minimal example - in version 9. (As an aside, I couldn't seem to find ...
8
votes
1answer
294 views

How do you insert more columns into Table cells?

How do you insert more columns into Table cells as shown below? To get to this table, go to File -> New -> Styled Notebook -> Textbook -> New -> Scroll down to the Table Cells.
1
vote
1answer
144 views

Community structure algorithm [closed]

I'm using CommunityStructureAssginment[] from GraphUtilities but not sure what is the algorithm behind it. May be someone knows what is the algorithm? Or any info on the community structure ...
4
votes
1answer
128 views

Tweaking Prime[n] to return 1 when n==0

I manually evaluate this cell to set Prime[0] Unprotect[Prime] Prime[0] = 1 Protect[Prime] I manually evaluate this cell to reset Prime[0] ...
7
votes
7answers
418 views

How to pick an element of a row corresponding to the minimum in a particular column?

How can I find what value in column 1 of my list corresponds to the minimum value in column 2?
5
votes
3answers
318 views

ComplexInfinity/Indeterminate error when evaluating derivative

Motivation: I want to find the coefficients for the polynomial that is obtained when one adds together the first $n$ natural numbers to the power of $a$; that is, when you consider $1^{a} + 2^{a} + ...
3
votes
3answers
423 views

Converting a string containing whitespace-delimited numbers to a list of numbers

Suppose I have a string str that contains only whitespace-delimited real numbers: ...
3
votes
1answer
344 views

Handing a list of constraint expressions to a C++ function with MathLink

I need to solve an optimization problem, which is defined in a Mathematica notebook. Using Mathematica's FindMinimum is not an option, because it is too slow. So, ...
13
votes
2answers
283 views

How to make use of NumericQ[x] = True (and use it safely)?

Basic Issue: I'm trying to understand the proper use of NumericQ's "magical" capabilities. Please consider the examples below. Actual question and some links are ...
11
votes
1answer
394 views

Formatting and printing lists with Mathematica scripts

I'm just starting out with Mathematica and I'm using MathematicaScript rather than the GUI. However, I'm having trouble formatting a list when printing it. Suppose ...

15 30 50 per page