1
vote
3answers
1k views

Importing multiple files using a for-loop

once again I am stuck solving a seemingly easy problem :( I would like to make a List of tables by importing data from several txt-Files. Importing the data into a table works so far and I am able to ...
15
votes
4answers
1k views

Mathematica for teaching orthographic projection

Edit: All the four answers to this question are great, and if you're interested, you should take a look at all the answers. Nevertheless, belisarius' code was accepted since it was closest to what I ...
3
votes
1answer
248 views

Color lost when saving Mathematica cell as HTML

Question 1(Color Lost Question[Solved by using Item]): When I evaluate the cell generated by ...
3
votes
1answer
193 views

Strange behaviour of PolyLog Function

I discovered some strange behaviour of the PolyLog[] Function in Mathematica which seems to me like a bug in the function implementation. It looks like ...
1
vote
2answers
94 views

Given a list of context names, how can I access all the variables with the same name across all those contexts?

I'm looking to access variables in different contexts. The contexts are stored in a list labeled contexttable. Each context, of course, is a string. Is there any ...
4
votes
1answer
218 views

CreateCOMObject doesn't work on home edition

I can call an application named "PinPoint.Plate" with Visual Basic, Python and Mathematica version 8 but not with version 9. I can still call Excel though. How can I fix this? This is what I did: ...
5
votes
2answers
856 views

Log of products to sum of logs

I have a log of products: $$\log \left(\prod _{i=1}^n \left( g(a(i,i)) \prod _{k=1}^i f(a(i,k))\right)\right)$$ That I turn into a sum of logs (I know everything involved is nice enough): $$\sum ...
8
votes
1answer
224 views

FindClusters for 3D Pancake/Platelet Shapes

I'm looking to properly cluster a dataset of roughly 3 million data points in 3-space. The shapes form closely spaced "clusters" that resemble pancakes. Here is a downsampled dataset: ...
4
votes
2answers
137 views

Unexpected side effect of removing the Orderless attribute from Times

First I make Times orderless: ClearAttributes[Times, Orderless]; Then I evaluate ...
1
vote
1answer
133 views

Efficient evaluation of function defined by multiple Sum

I tried to make a workable example here. The problem is that it is very very slow. I must be doing something very stupid out here. Can somebody give me some clue how to evaluate this multiple sum ...
1
vote
2answers
304 views

Rearranging an equation with the sine function in it [closed]

When I evaluate Solve[a==Sin[b*c], b] to rearrange the following for $ b $: $$ a = \sin(bc) $$ I get the following result from Mathematica: $$\begin{align*} ...
0
votes
1answer
102 views

How to extract data from a list? [duplicate]

I have a long list of coordinates defined in some 8D space. I need to extract the first three coordinates only. How ? For example : ...
6
votes
1answer
125 views

Tooltip not working in web deployed cdf

I deployed a CDF file in a web page. I used both Mouseover and Tooltip functions. They both work in the raw CDF file. The ...
2
votes
2answers
229 views

A While Loop with two different steps/iteration

I'd like to know if there is a possibility to solve an equation in a while loop with 2 different steps. I want the step to be small at the beginning and bigger after a certain value of sigma (sigma is ...
4
votes
2answers
354 views

List reversion inspired by Python

In python, if you wish to reverse a list, here is the trick: range(10)[::-1] => [9, 8, 7, 6, 5, 4, 3, 2, 1, 0] Note: ...
3
votes
1answer
189 views

How to store values indexed by integer partitions for fast access?

I have a huge list of values indexed by integer partitions. If I store them simply in a list, then, when I want to access the value corresponding to some particular integer partition, I have to find ...
6
votes
2answers
749 views

How can I superimpose a set of points on a ContourPlot?

I am familiar with Mathematica to a certain extent, but its subtleties still elude me. Currently I am trying to solve the following problem: The function $f(x,y)$ is continuous. I know how to create ...
5
votes
4answers
844 views

How can I fill a curve in ParametricPlot3D?

I'd like to fill a curve in a ParametricPlot3D in the same way as I might with ListPointPlot3D; i.e., ...
-7
votes
5answers
448 views

Translating MATLAB's cell2mat into Mathematica

How I can define a function in Mathematica such that it acts same as the cell2mat command in MATLAB? Example (in MATLAB): ...
1
vote
3answers
275 views

Fitting data without an equation

Let's say I have some data generated by anything. For practical sake, let's say I was able to generate a sequence of numbers through a recursion and I listed them out through a table of numbers. ...
4
votes
2answers
280 views

Extracting Reduce results

I'm solving a Diophantine equation inside of a function using Reduce but I'm having trouble extracting the necessary parts of the answer. For example, if my input ...
1
vote
2answers
543 views

How do I divide the columns of a matrix by the sum of its elements?

I am trying to create a transition matrix for a network. In order to do this, I need to sum down the column (the out degree), and then divide the column by the out degree in order to normalize it. ...
5
votes
1answer
152 views

Why is Flattening a CoefficientArray so slow?

I have a vector of $n$ degree $n$ polynomials in $(x,y,z)$, each of whose coefficients is an inhomogenous linear expression in $3 n^2$ variables. I want to write down the linear equations in these $3 ...
1
vote
2answers
562 views

Irregular Confluent Hypergeometric Functions (Spherical Coulomb Wavefunctions)

I want to program in the regular and irregular spherical Coulomb wavefunctions $F_\ell(\gamma,kr)$ and $G_\ell(\gamma,kr)$, respectively, which are defined in terms of the regular and irregular ...
3
votes
1answer
118 views

How do I edit the background of Axis labels in my plot?

I'm using the standard report stylesheet in Mathematica and when I output a plot, I've set it up so that I get a white background, however the axis labels still have a gray background. How do I change ...
7
votes
4answers
214 views

Why does array packing in Table behave like this?

Consider the following example, which generate two identical arrays. Why sometimes the array is packed and sometimes it doesn't? And why they perform differently? Here the arrays are packed: ...
3
votes
1answer
153 views

FromQuaternion and QuaternionQ not working symbolically?

How can I get Mathematica to work with quaternions symbolically? I want to do some quaternion math without defining the actual coefficients, and then extract the coefficients from the resulting ...
1
vote
1answer
97 views

Controlling preferences of deployed notebooks

The following screenshot shows a toy example to illustrate what I want to accomplish: The above mimics the structure a type of notebook that I want to deploy for both Mathematica and PlayerPro ...
0
votes
1answer
730 views

Solving derivative of cumulative normal distribution log likelihood

I am a newbie and I'm trying to use Mathematica to obtain the symbolic Maximum Likelihood Estimation for a cumulative normal distribution. So far I have reached the step where I have the derivative of ...
2
votes
0answers
92 views

Workbench error message: LinkObject::linkv: Argument Null in Null is not a valid LinkObject

From time to time I get this error message when I save my .m file in Wolfram Workbench: LinkObject::linkv: Argument Null in Null is not a valid LinkObject I can't really figure out what causes this ...
5
votes
2answers
199 views

Is there something wrong with VertexConnectivity

As I noticed in the documentation VertexConnectivity is defined as the following The vertex connectivity of a graph $g$ is the smallest number of vertices whose ...
3
votes
3answers
455 views

How to plot a parametric region representing a coordinate transformation

The Wikipedia page on Rindler coordinates shows a nice example of how a coordinate transformation can be represented in a plot. They start with two coordinates $T,X$ with $0 < X < \infty,\; -X ...
12
votes
2answers
458 views

How can I compile this function

I want to simplify my function f1 to f2, but f2 can't be compiled. How can I make it ...
3
votes
0answers
63 views

Non-preemptive evaluation of a dynamic function? [duplicate]

I want to monitor a long calculation that is triggered by the release of a Slider. While one can indicate running calculations when the main evaluation loop is ...
0
votes
2answers
131 views

ListPlot of lists with specified x coordinate

I want to do: ListPlot[{{x1, y1}, {x2, y2}, ...}] each y being not a number but a list of numbers. I tried: ...
0
votes
3answers
260 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
440 views

Finding numerical/analytic solution to a derivative

Consider the following system of equations, with 11 dependent variables: ...
9
votes
2answers
278 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
242 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
154 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
379 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
566 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
290 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 ...

15 30 50 per page