# All Questions

910 views

### How to apply a function to a list of tuples

trialList = {{0, 24.701}, {1, 24.69}, {2, 24.733}}; f[x_] := x + 1; I would like to apply the function f to only the second ...
268 views

### Why does this pattern for combining two lists require triple underscores (___) to work?

I understand that __ is a list of one or more elements, and that ___ is 0 or more elements, but when I try this rule with 2 ...
634 views

### Efficient method for inverting a block tridiagonal matrix

Is there a better method to invert a large block tridiagonal Hermitian block matrix, other than treating it as a ordinary matrix? For example: ...
8k views

### Make a scatter plot from two lists

I have two lists of values xx = {0.1, 0.3, 0.35, 0.57, 0.88, 1.0} yy = {1.2, 3.5, 4.5, 7.8, 9.0, 12.2} I want to make a scatter plot (list plot) with xx as x ...
81 views

### Asymptotic expansion of a list

I am trying to calculate a asymptotic series expansion of a list. ...
676 views

### How can I suppress message “… cannot be used as function”?

I'd really appreciate your help. The code gives me a solution, but in the end it says it cannot be used as function, which is not true. Script: ...
198 views

### How can I impose a condition on Solve or FullSimplify?

I would like to define a real 3-D vector as, say, v = {x, y, z}, but I want it to have a fixed norm and not necessarily a unit norm. I would like to impose this ...
175 views

### Manipulate fails with f[x]=x^k/(1+x^k)

I have this code: Clear[f] f = Function[x, x^k/(1 + x^k)]; Manipulate[Plot[f[x], {x, 0, 5}], {k, 1, 10}] But nothing draws as I move the slider. Am I missing ...
684 views

### Why are there two separate MathKernel processes running when I start up Mathematica 9?

When I start the Mathematica 9 Front End, and check the list of running processes, I see two separate MathKernel processes. If I only start the kernel, without a front end, then there's only one ...
1k views

### Join a piecewise plot

I wrote some code to get a piecewise plot which is displayed correctly. Now I'd like to join the various parts of the plot, using some kind of interpolation, to get a continuous chart even though it's ...
54 views

### Mathematica: How to apply a function to a list of tuples [duplicate]

trialList = {{0, 24.701}, {1, 24.69}, {2, 24.733}}; f[x_] = x + 1 I would like to apply the function f(x) to only the second element of each tuple. How is this ...
3k views

### Fastest way to calculate matrix of pairwise distances

It is a very common problem that given a distance function $d(p_1,p_2)$ and a set of points pts, we need to construct a matrix ...
189 views

### Solve f'[x]==0 for x

I tried the following: f[x_] := x^n/(k + x^(2 n)); Solve[f'[x] == 0, x] But I got the following response: Solve::nsmet: This system cannot be solved with the ...
190 views

### Solving a differential equation for a variable in a function

This may sound like a very trivial question, but I need to solve a differential equation as follows: ...
574 views

### Simplifying a trigonometric equation to obtain specific terms

When I try to solve the non-homogeneous differential equation ...
610 views

### How to generate a matrix group?

I have three $7\times 7$ matrices (with real entries, lots of zeros) and I'd like to check if they generate a finite group (or, more precisely, if the group they generate is of precise order). Would ...
177 views

### How to extract the bin width from a Histogram made with an automatic binning method?

I am using the Scott binning method with Histogram and Histogram3D to plot some data. How could I find out the bin width chosen ...
848 views

### Steady states and eigenvalues for a non-linear system:

I am trying to understand a non-linear system of equations, and find their steady states and dynamics. I am noob to understanding Mathematica (I am using version 6, but I have access to the latest ...
1k views

### Convex hull of a 3D object?

I am trying to find a convex hull command for a Graphics3D object. Does it exist in Mathematica? ...
203 views

### Standard message definition construct

Why are the messages almost always defined like this (at least in packages): If[Not@ValueQ[function::usage], function::usage = "Usage message"] and not just like ...
136 views

I am using Mathematica 8. I would like to read some RData files which I have received. I do not currently have an installation of R on the machine with Mathematica.
407 views

### How to pass a list of arguments into HoldAll

I have a list of arguments (which in reality is lengthy): arguments = {a, b, c} arguments2 = {a_, b_, c_} f[Sequence@@arguments2] := a + b + c Note: It seems ...
376 views

### Evaluate Notebook from .Net

How is it possible to send the whole content of an existing notebook to Mathematica for evaluation by using NetLink/C#?
164 views

### Can anyone explain this strange behavior of InputForm?

In Mathematica 9.0.0, when to display the input form of two numbers, I come across maybe a puny problem. In order to focus on the problem, I will put up a simplified version. ...
2k views

### Methods for NonlinearModelFit

I am using NonlinearModelFit for a thesis project. I get quite different results if I change the Method to LevenbergMarquardt or QuasiNewton or ConjugateGradient ...
96 views

### What happened with the file?

What happened with this file? infile = "\\test data.txt"; outstr = OpenWrite[infile]; instr = OpenRead[infile]; Read[instr, Record]; Close[instr]; All ...
412 views

### Efficiently finding the positions of a large list of targets in another, even larger list

I have a big list. It contains nearly 60,000 sub-lists. It's structured like bigList = {{x1,y1,z1},{x2,y2,z2},{x3,y3,z3},.....,{x60000,y60000,z60000}}; I have ...
276 views

### ContourPlot from Vector Data

I have data in the form of x, y, vx, vy where vx and vy are components of the velocity vector at point x,y. I want to plot a contourplot of this. How can I do that since contourplot asks for three ...
861 views

### Clustering a set of points

I have a set of 2D points in the square defined by {-1, -1} and {1, 1}. These points typically form compact groups. I need to ...