All Questions

2
votes
1answer
143 views

Problem with numeric integration

I am having trouble with the UnitStep function as in the title. My problem is very simple, but I am not able to get a numerical result. I have ...
6
votes
1answer
145 views

Why is there a limit of 15 different instruments to be played simultaneously, with Sound / SoundNote?

It seems to be impossible to play more than 15 different instruments simultaneously with the Sound[{Soundnote[...],...}] construct. Any guesses why it is so? With ...
2
votes
2answers
515 views

How can I control the number format of exported data?

I'm having issues while exporting a tables of numerical values to "*.dat" data files. Here's the thing, sometimes when I export a table, I get more decimals on some random values. The problem is that ...
5
votes
1answer
1k views

Module with “local functions”

I am trying to use a Module having "local functions", i.e., those which I need to define only inside this module. So I tried this: ...
12
votes
1answer
1k views

Eigenvalues and Determinant of a large matrix

Can anybody kindly explain to me what is going wrong regarding a simple problem I have? I can find the eigenvalues of a large matrix using Eigenvalues[], but when I ...
7
votes
1answer
100 views

Attaching the same message to several symbols

It is common in many packages, as well as system symbols, that the same message can be issued by several functions. Here's an example: One mechanism that can be used for this is to define the ...
5
votes
2answers
547 views

Saving table of plots into a single figure within a pdf file

I have following code: ...
-1
votes
1answer
187 views

How can I change the default output number form to accounting form?

By default, large numbers are displayed in scientific form in output like 1.2345 x 10^8 in Mathematica 8.0.4, but I would prefer having numbers in accounting form ...
12
votes
4answers
296 views

How to catch complete error message information

If I evaluate this expression: Module[{}, 1/0;0^0]; msg = $MessageList I get: ...
3
votes
1answer
165 views

Add new JDBC Driver to connect MM to SQL database

I cannot open a SQLConnection to a SQL vectorwise database and I assume the JDBC driver is the problem. A JAR file was provided to me - the only info additionally provided to me was the java class: ...
3
votes
2answers
729 views

3D scatter plot from a txt file

I have a txt file with space-delimited x, y, z coordinates of several points. The points are organized into groups of unequal size; the groups are delimited by skipping a line, like this: ...
12
votes
3answers
732 views

Mathematica Parellelization on HPC

I'm currently using Mathematica on a High Performance Cluster (HPC) which consists of many compute nodes each with around 16 cores. I currently run my Mathematica script on 20 of the nodes that ...
0
votes
2answers
2k views

Export plot data in Mathematica [duplicate]

How can I export data, which is plotted using something such as: Plot[Γ[x]/(1.6*10^(-19)), {x, 0.1, 1.2}] into a .txt file in Mathematica?
3
votes
4answers
314 views

Mapping over the last level of a list, or equivalent operations

I would like to style each element of my list using Style. But when I try ...
5
votes
1answer
450 views

CUDALink is not initialized

I've upgraded to Mathematica 9.0 on Ubuntu 12.04 with the latest Nvidia driver (304.64). I load CUDA by using, as usual, Needs["CUDALink`"]. ...
2
votes
2answers
67 views

Invalid comparison in RegionPlot

I'm trying to plot something like this: RegionPlot[0 < (.5*a2 - .25*a1)/(a2 - a1) < 1 && 0 < a1 < a2 < 1, {a1, 0, 1}, {a2, 0, 1}] The ...
8
votes
4answers
817 views

Numerical integration of a numeric data available as a nested list

I have some numerical data in the form of a list with the following structure: {...{x,y,z},...} defining a surface z=z(x,y) in a 3D space (x,y,z). The data came from a simulation, and I am ...
3
votes
3answers
313 views

How can I fill a wire-frame structure with gas in a Graphics3D drawing?

I am very poor at visualization. I want to make a transparent "building" filled with gas. I wrote the following code for the building and it's fine. ...
17
votes
1answer
490 views

List manipulation to build a functional expression

Since Mathematica deals with Head[a, b] as an expression in this way The first Part of Head[a, b] is ...
8
votes
1answer
493 views

Control objects Sizing and placement in Graphicsgrid Vs Grid:

I have created a grid, and also made a list of control objects(e.g., input fields, buttons, etc.). Then, I lay the list in my grid. There is no problem. However, the final layout takes a lot of time. ...
10
votes
7answers
557 views

How can I Flatten this List with Inner List of Lists?

Given the following List ...
4
votes
3answers
169 views

Creating a nonperiodic function in mathematica

I want to create a non-periodic square wave with values of 1 and -1(not necessarily alternating). For e.g. I want to convert an arbitrary array like {1,-1,-1,1,-1,1,-1} into a function. I tried ...
1
vote
1answer
100 views

Avoiding unnecessary computations within loops

Consider the following data: test = RandomReal[{1, 2}, {10, 5, 3, 3}]; How can I do the following without the For loops, e.g. ...
12
votes
1answer
601 views

GPU user experiences

Edit Thanks to all who have responded! I now have plenty of information on the GeForce 650M GPU as found in most new, mid-range Mac laptops; the Mandelbrot code below runs in comfortably under a ...
5
votes
1answer
195 views

Definite Integral over a path

What does Integrate[f[z], {z, a, b, c, d}] exactly calculate? Is it $$\int_a^b f(z)\, \mathrm{d}z +\int_b^c f(z)\, \mathrm{d}z +\int_{c}^d f(z)\, \mathrm{d}z ...
1
vote
2answers
239 views

Deep Pattern matching with repeating arguments

I have a function that accepts a single argument that is described by the following grammar: ...
4
votes
1answer
115 views

Why this code is considerably slower in version 9?

I have a Mathematica code for computing and plotting the density which corresponds to a given potential. The following code was written few years ago using version ...
1
vote
1answer
322 views

Stop Mathematica from giving imaginary solutions

I have the following equation: $$D=\frac{1}{64} \pi A ^3 B \sin \left(C\right)-\frac{1}{2} \pi A B \sin \left(C\right)$$ which I want to solve for $A$. The equation is cubic in $A$ so this should ...
1
vote
1answer
70 views

Confirming the existence of a function related to a matrix

Is it possible to get an answer to the following question in Mathematica? Let $M$ be a $n$ by $n$ matrix, is there a function $m:\mathbb{N}\times \mathbb{N}\rightarrow \mathbb{Z}$ such that ...
8
votes
4answers
681 views

Showing a rectangular plot on an almost-closed sphere

I am currently teaching some students about the "point at infinity", and how it allows us to treat circles and lines as "the same", etc. I would like to kind of show this happening with a series of ...
0
votes
1answer
201 views

How could we define a function recursively?

Let us first consider the constructon of the following simple iteration ...
6
votes
1answer
372 views

Mathematica vs Sigmaplot (Non LinearModelFit)

I asked a question in a previous post that was closed because "The title of the question is not correct and the issue here is too trivial to help anyone later". NonLinearModelFit It's possible ...
2
votes
2answers
780 views

Returning a function from a Module [duplicate]

I'm having problems working with the output from DSolve whilst in a module. To handle the result outside a module typically I would do something like ...
7
votes
2answers
1k views

Get the coordinates from ContourPlot and RegionPlot

How do I get the coordinates from a contour plot I've done in Mathematica? For example, I have a two-variable function f[x, y], for which I can make a contour plot: ...
5
votes
2answers
584 views

Problem displaying eps exported histograms in Word 2010

I am having problems displaying histograms exported as .eps in Word 2010. I don't have problems though displaying them in a specialized .eps viewer. (Postsript viewer from Rampant logic) I am writing ...
0
votes
0answers
32 views

How to define a vector of arbitary length [duplicate]

I need to use a vector of length which I can change, indexed symbolically So for e.g. when N=3 I'd like to have vec={c1,c2,c3} when N=5 ...
5
votes
1answer
151 views

Extracting text from cells, preserving non-ASCII characters

Consider the following setup, based on this answer by WReach: ...
2
votes
1answer
468 views

Extract data from plots in papers including error bars

I would like to know how to extract data from plots in a paper and, also, how to do that in a way that include error bars. I know there are specific softwares to do that, e.g. Plot Digitizer, which ...
2
votes
1answer
150 views

How to work with the symbol EndOfFile? [duplicate]

How to work with the symbol EndOfFile? I want to use the EndOfFile symbol to determine when my control structure reaches the end ...
-1
votes
1answer
102 views

How to separate a vector into two vectors, one having the first half of my original vector and the other having the second half

I have a set of n vectors with an even length. Let us make an easy example with 3 vectors of length=4: ...
7
votes
1answer
523 views

TensorContract of inverse matrix

Matrix inverse in mathematica If $A$ is an invertible $n \times n$ matrix, then $A\cdot A^{-1} = I$. To get this statement in Mathematica, you need the assumption ...
2
votes
2answers
619 views

How to change the density range in DensityPlot?

This is an example from Mathematic Help, DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, ColorFunction -> "SunsetColors", PlotLegends -> Automatic] ...
2
votes
1answer
117 views

How to change the output format of a built-in function

Is it possible to change the output of build-in functions? I would like to change the output for IdentityMatrix[n] to "I", so I tried ...
13
votes
4answers
486 views

Is it possible to select outliers on a graph and determine the index of the outliers?

I have a large data set of experimental data for which I have determined a theoretical fit. However, for some of the experimental data I took, there was systematic error, leading to the data deviating ...
1
vote
1answer
325 views

Solve equation with inequalities for parameters

I want to solve following equation: ...
2
votes
2answers
282 views

How to draw Graphics3D items with straight border lines?

I want to make a Polygon with straight border lines. For that purpose I wrote the following code, but it doesn't show straight borders. ...
0
votes
1answer
132 views

Problem with plot of discontinuous function of 2 variables and adding legend to a contourplot

I have 2 problems with which I would need help: -first one is that I would like to plot a discontinuous function of 2 variables but can't succeed (see attachment) -then I also would like to display ...
0
votes
1answer
130 views

TabView resets to default when selecting data using Control object

I have 3 drop down boxes on one of the tabs in my TabView. Two of the drop down boxes results are used in a Select statement to ...
1
vote
1answer
80 views

Why doesn't Compile work on Permutations function with second args?

Here is a narrowed-down example, the first case works, but the second one refuses to use the compiled version: ...
2
votes
1answer
773 views

How to solve equations self-consistently

I want to solve the following equation self-consistently. So, H.u = e.u {{1, d}, {d, 1}}.{u1, u2} = e.{u1, u2} I guess an initial value for ...

15 30 50 per page