15
votes
6answers
803 views

How can I evaluate only a single step of a recursive function?

Let's say have a simple recursive function for the Fibonacci sequence f[0] := 1 f[1] := 1 f[n_] := f[n - 1] + f[n - 2] but I want to see how it will expand in a ...
4
votes
1answer
466 views

Using NDSolve to solve a system of coupled PDEs

I am trying to solve the Gross-Neveu model in one dimension for a specific soliton initial condition. I am trying ...
4
votes
2answers
175 views

Display full path of current notebook on title bar?

Is there a setting in Mathematica notebook interface to get the title bar to display the full path to the current notebook?
2
votes
2answers
332 views

How to combine ListPlot and ListPlot3D

Suppose I have a plane drawn by ListPlot3D and I have one intersection of that 3D image drawn by ListPlot. How can I combine ...
7
votes
2answers
222 views

Connecting to Microsoft SQL with version 10

After upgrading to version 10, functions relying on a connection to a Microsoft SQL database no longer work. When I attempt to open a connection with something like: ...
10
votes
3answers
665 views

Upload a file using a WolframCloud WebForm

I tried to create a Webform in WolframCloud that asks/browses for a file and then uploads it to a specific folder. The following are the directions I investigated but it does not work: ...
2
votes
1answer
157 views

Equivalent command to the Maple indets command

This carries on the discussion here and here. I had mistaken Variable[] to give you ALL variables in an expression, but apparently, it is not meant for that. <...
1
vote
0answers
85 views

Creating a matrix from a list of simultaneous equations

I have a list of n simultaneous equations of the form, w A[n] = (K[n,n+1]+K[n-1,n])A[n] - K[n,n+1]A[n+1] - K[n-1,n]A[n-1] ...
3
votes
3answers
105 views

Pattern for finding matches that are different [duplicate]

I am trying to solve the following problem. I have tuples of size 3 {{a, b, c}, {a, b, c}, {a, b, c}} I would like to find cases where all the elements in a ...
2
votes
0answers
47 views

Automating constructor definitions (OptionValue eval time)? [duplicate]

I'm settling in on a programming pattern for "constructors." I can illustrate the pattern with the following example, which defines a constructor newBar for "...
6
votes
2answers
465 views

2D smoothing spline interpolation

Does Mathematica have 2D smoothing spline interpolation built in? I requires an interpolation method with smooth first derivatives and cubic bivariate splines fulfill this nicely. In python I would ...
5
votes
2answers
492 views

Simplifying general solutions of differential equations (driven harmonic oscillator)

Solving general differential equations in Mathematica usually leads to somewhat unsightly results. As an example, consider the solution of the driven, damped harmonic oscillator: ...
3
votes
1answer
142 views

How can I connect the local minimum-value points between a series of curves by dotted lines?

I have a set of data obtained by NDSolve. After I plot it, I want to indicate some feature of the curves. For example, I want to link the local minimum-value points between these curves by dotted line ...
1
vote
2answers
102 views

Using expressions in Text

I want to use Text to add some labels to a graph and was wondering if it is possible to use expressions inside Text? Here is a MWE of what I am trying. ...
22
votes
1answer
571 views

Total much slower in version 10

Issue introduced in version 10, fixed in 10.0.2 Compilation nowadays may give very fast functions. Here is an example for finding the sum of a list of machine numbers, just as the built-in function ...
3
votes
1answer
143 views

How to remove recursion, and write it functional and efficient way?

I wish to implement the following recursion efficiently. ...
3
votes
2answers
88 views

Conditional replace of a column

Im trying to replace the value in the Nth column of a list if a condition is true, returning the modified list. I've tried modifying the answer from 61219 and been through most of related questions ...
3
votes
2answers
268 views

Difference between double quotes

I have a notebook and I enter something like PlotLabel->"my label with dynamic number "<>ToString[strange] and I get errors like However, the double ...
1
vote
1answer
361 views

Find extreme values in a polynomial expression

I have been hunting down and could not find an answer to my question. As I've now been struggling for quite a while and believe it is a simple trick that's preventing me from getting over this problem,...
8
votes
3answers
369 views

Help recreating a gif

For my math class I am trying to recreate a mathematical GIF. Here is the GIF I wish to make: At this point I think I have a 3D function that would work to lay the hexagons on to. ...
1
vote
1answer
124 views

Cluster a time series by labels

I have a time series, tab delimited dataset with the following format ...
13
votes
2answers
798 views

How to calculate position from 3 dimensional acceleration data?

I discussed this problem yesterday with Pickett here. We concluded that the best solution may be just Interpolate and then ...
11
votes
3answers
259 views

How to deal with the condition $u_i=u_{i+1}$ in B-Spline basis function?

The defintion of B-Spline basis function as shown below: Let $\vec{U}=\{u_0,u_1,\ldots,u_m\}$ a nondecreasing sequence of real numbers,i.e, $u_i\leq u_{i+1}\quad i=0,1,2\ldots m-1$ $$N_{i,0}(u)= \...
0
votes
2answers
90 views

Use conditional expression inside With

I want to assign a number to an internal variable, depending if a specific option has been given, but it seems to fail. Something like: ...
1
vote
1answer
253 views

How can I get the second derivative and the reciprocal from the result of NDSolve?

I have obtained a result h(x) from NDSolve data. I can plot it data = Import["C:\\Users\\...\\Desktop\\data.dat"]; ListLinePlot@data Now I want to get the 2-nd ...
12
votes
3answers
484 views

Transform Dataset so it can be used as training set for Classify

Trying to learn the new Dataset features, I am playing with the iris dataset: ...
0
votes
1answer
97 views

Plotting/Visualization in Workbench?

I would like to ask a question with Mathematica Workbench. The workbench is based on Eclipse. Of course, it would have no problem to add breakpoints and debug, but I wonder if it is possible to ...
11
votes
3answers
618 views

How to trigger UNIX command-line command from Mathematica notebook?

At UNIX command line, one can run ls -la $HOME. How to trigger this from Mathematica notebooks? Run["!ls -la $HOME"] ...
2
votes
1answer
131 views

Can I line the mesh lines on a `RegionPlot3D` up with integer values of the axes?

(Sorry if this is a duplicate, I searched briefly and didn't find anything.) I have region plots in 3D like: ...
1
vote
0answers
62 views

How to get the subdirectory of a ftp weblink?

For example, I can use FileNames["*",dir] to get all subdirectory under dir if dir is some directory of my local computer. Suppose that I want to get all ...
6
votes
2answers
261 views

List of tuples without forbidden pair

How do you get a list of tuples in Mathematica that do not include certain pairs of elements? For example, I'm trying to list sequences of matrices of a certain length, and I do not want two adjacent ...
5
votes
2answers
192 views

Simplification due to recognition of dummy indices in sums?

Today I noticed something weird concerning implicit sums. Apparently, Mathematica cannot recognize dummy indices as such and simplify accordingly. Consider: ...
4
votes
3answers
211 views

How to re-parse (or re-map) character '.' to user-defined function

The default behavior of the character . between two non-numeric characters is to be interpreted as the infix of the Mathematica function ...
1
vote
0answers
228 views

Manahalobis distance between two vectors

I want to calculate the Mahalanobis distance between two vectors that represent two points. For example: ...
3
votes
2answers
243 views

Solve and Reduce with Log finding unexpected root

We give equations like $\ln(1-x)-\ln(x-2)=0$ to our calculus students. This equation clearly has no solution, since $\ln(1-x)$ is only defined if $x<1$ and $\ln(x-2)$ only if $x>2$. Still, the ...
8
votes
2answers
242 views

Understand MeshFunctions with Intercepts

Bug introduced in 7.0.1 or earlier and persisting through 10.0.2 or later While I've been thinking about this question, I tried to visualize the Intercepts. I use three snippets, actually snippet 1,...
0
votes
1answer
129 views

About Symbolize and Variables

I do believe this sort of similar questions had been asked many times, so I have read a LOT. For example this and this as well as many other related posts. But a glance at what my main question is ...
4
votes
0answers
89 views

How to use named arguments in .NET/Link (COM interface to Excel)

I am using Excel from Mathematica through .NET/Link (specifically using the COM interface). The following C# code adds a sheet after the last sheet: ...
3
votes
1answer
142 views

What's the complete list of file name extensions used by Mathematica?

What's the complete list of file name extensions used by Mathematica? The ones I know are Before V8 .m .nb .mt After V9: ...
5
votes
2answers
121 views

Paralleizing the Plot function internally

I have a function of several parameters, funct(a,b,c,d,f,...). Mathematica deals with this function fine but it takes a minute or so to make a data point. I want to plot graphs of funct using code ...
1
vote
0answers
246 views

Butterworth Bandpass Filter

I am translating someone else's code which is written in matlab to mathematica. I need help to design a Butterworth bandpass filter in mathematica to filter a sine wave. the sine wave is generated ...
4
votes
0answers
90 views

Integrate yields complex value, while after variable transformation the result is real. Bug?

I have the follwoing integral: Integrate[1/Sqrt[0.7 + 0.3*(1 + z)^3], {z, 0, Infinity}, Assumptions -> z \[Element] Reals] >> -3.36354 - 3.85013 I the ...
3
votes
1answer
174 views

How to create a 1D vector by selecting a straight line in a given angle of 2D array

Suppose I have an image created by the code provided below. I want to select a line (1D vector) $ \left(y-y_{0}\right)=n\left(x-x_{0}\right) $ from the output image (2D matrix) by specifying $n$ and $...
0
votes
1answer
37 views

Rigging a function to output a distinct value every nth call

There's some fixed script I am unable to alter (keeping things simple: Table[f[i], {i, 1, 10}]), , however, I can alter a function that the script calls (again, ...
0
votes
2answers
263 views

Maximizing a trigonometric function

This is probably a naive question, but here it goes: I know that $$r\cos a+s\cos b+t\cos c \leq \frac{rs}{2t}+\frac{rt}{2s}+\frac{ts}{2r},$$ subject to the conditions $a+b+c=\pi$ and $r,s,t$ are ...
1
vote
0answers
115 views

Crop VoronoiMesh by States Latitude and Longitude

I want to crop a VoronoiMesh output (made with some point inside a Country state) by this same state border. I downloaded a .kmz...
1
vote
0answers
165 views

Problems with NIntegrate, levmaxord error

I am trying to integrate some spherical harmonics, for scattering over a sphere, using the SphericalHarmonicY and NIntegrate ...
0
votes
0answers
121 views

Numerical integration with large exponents

To make a long story short, I am doing mostly analytic calculations and therefore do note have good skills in numerical integration. I have to numerical integrate the following integral $$\int_{a_1}^...
0
votes
2answers
74 views

Getting FerrersDiagram to work

I am trying to generate FerrersDiagram (see http://reference.wolfram.com/language/Combinatorica/ref/FerrersDiagram.html), any clues to getting it to work? I get error message for the following: ...

15 30 50 per page