# All Questions

51 views

### What is the natural way of using Dataset to get a FittedModel?

The new Dataset in Mathematica 10 is a great addition to the language, potentially reducing the convenience gap with R. Given this, I would like to understand what the equivalent simple or natural ...
10 views

### How do I define the range of the argmax

I am trying to argmax a function over x, but x only define between [0,1] How do I do that? I have tried: ArgMax[f_1(x),x\Element[0,1]] But it gave me an error. ...
11 views

### Text user interface code

How do I convert gui based mathematica code into TEXT USER interface code? I have to solve about 30 symbolic equations simultaneously. Mathematica is taking more than 24 hours to solve in a 6 core ...
148 views

### Sum with Levi-Civita

I'm trying to write the expression $$\sum_{\alpha,\beta = 1}^{4}\epsilon_{\mu \nu\alpha\beta}a^{\nu} b^{\alpha} c^{\beta}$$ in Mathematica, where $\epsilon$ is the Levi-Civita symbol and $a$, $b$, $c$ ...
132 views

### Zero-order interpolation not going fully around

Connected to this question, I want to do a zero-order interpolation of a bunch of datapoints which is periodic. The code I use is as follows: ...
229 views

### How to create a screen shot of a notebook

I would like to use Mathematica programmatically to take snapshots or screenshots of any open notebook. For example, I would like to get from the notebook created with this command ...
41 views

### Express a complex function $f(z)$ as $u(x,y)+iv(x,y)$

How can I write a complex function $f(z)$ in the form $u(x,y)+iv(x,y)$ using Mathematica? Re and Im do not work, because they do it for complex numbers, not functions. For example, if I try ...
43 views

### Manipulate gives the output as a blank plot, but I'm not sure why

I'm using Mathematica 9 to try to manipulate a 3D plot. My code is: ...
43 views

### How to insert zero counts uniformly with Dataset Counts query

Missing[] is generated when an association does not contain the specified key. ...
85 views

### Using select to pick out elements of nested lists in an odd way

Suppose I have a nested list such as, {{{A, B}, {A, D}}, {{C, D}, {A, A}, {H, A}}, {{A, H}}} Where the elements of interest are, ...
100 views

### Creating a new list by dropping sub elements of the original list

Suppose I have a nested listed as follows, {{{1,2},{3,4,5},{2,3}},{{2,3,4},{5,4,1},{1,4,3}},{{3,4,5},{3,4,5}}} Where the elements are, ...
43 views

### Exporting an overlay of two plots

I have a ListLinePlot and I'm trying to place a close-up of a specific range in the ListLinePlot. Using overlay I solved this problem with: ...
36 views

### Integrating Mathematica in Blackboard

I teach Economics at University. I often use Mathematica to generate interactive diagrams with demand and supply curves. We also use Blackboard (blackboard.com) to manage our subjects, including ...
14 views

### What to do when an “error-free” compiled function uses MainEvaluate?

Consider the following code: ...
106 views

### Circumnavigate a curve (part 2)

I got help from Kuba on a previous post regarding this issue I'm having but after integrating that solution into my code, the problem changed and I am left with something I don't know much about (even ...
69 views

### Key->Value or Value when returning (multiple) parts of an Association

There seems to be an idiom whereby multiple parts generates Key->Value forms whereas for single part specifications, only a Value is returned. This however, can lead to inconsistencies as follows: ...
74 views

### Using the OSX Cocoa-APIs from Mathematica via Link-Technology

I'd like to access Cocoa-API's (Foundation, AppKit) from Mathematica and have researched the following ways: CocoaLink: A deprecated Package by Rob Schlofield from 2009, which is still available on ...
294 views

### Is there a function for nearest power of 2 in Mathematica like nextpow2 in MATLAB?

I am looking for something like nextpow2 in MATLAB like this: P = nextpow2(A) returns the exponents for the smallest powers of two that satisfy $2^P \geq\left|A\right|$.
196 views

### Conditional Expectation — How can Mathematica find a more general closed form?

Mathematica can't find a solution to this Expectation. ...
678 views

### Symbolic solution(s) to generalized Heat equation

Symbolic solution(s) to Heat equation? or more generally,(eventually) Green functions to known PDEs I am interested in variations of the heat equation: or more generally or even more generally ...
29 views

### Needs entry point of a package from a Mathematica script

I am writing a bunch of Mathematica scripts to run command line in a HPC environment. I am organising my solution in small chunks I can test separately. So I have a directory structure like: ...
45 views

### Check for holomorphy of a function

Given a (rather complicated) function H(z), what is the best approach to check symbolically whether it is holomorphic? What I tried is checking explicitly the Cauchy-Riemann equations: ...
141 views

### Defining a new matrix product of matrix function

Suppose I have two matrices A, B, whose entries are functions of x. Suppose they are 2*2. In the product, each entry is of the form $\sum_k A_ik B_kj$. There are two summands corresponding to k=1,k=2. ...
46 views

### FindDistributionParameters of a sum of a mixture distribution

I have this Mixture Distribution of two Normal Distributions: ...
33 views

### How can I append associations with uneven elements? [duplicate]

My dataset is pretty simple so far: ...
137 views

### How to change the aspect ratio with drawing tool?

I'm drawing an image in editing an slide show with the drawing tools. But the aspect ratio of the created drawing seems fixed and not changeable with mouse dragging the border and corner as in other ...
54 views

### Symbolic matrix calculus: What's new in Version 9

I have seen some of the related posts, which ask about doing matrix calculation on tensors unknown dimensions. One of the posts mentioned that version 9 has some capability, but it was concerned about ...
59 views

### Piecewise Polynomial Interpolation

Given some data pairs $(x_i,y_i)$, with $i=0,...,m$, and a degree $r$, I wish to build a piecewise polynomial function to interpolate these data. That interpolation should be continuous, and, on every ...
74 views

### Strange message appearing when using Wolfram Alpha in Mathematica

I have Mathematica 9.0.1.0 and I've recently noticed that whenever I press the equals sign and type something like Sech[x]^2, I get the message: I then tried other search queries, such as p^2, ...
135 views

### Using ReplaceAll to replace a head

Why would this work to replace the head b with newHead: ...
71 views

### Get the last line from from each of a large number of files, transform them, and write all results to a single new file

I have several hundreds of .csv files that are not logically named (contains numbers, characters, and special characters), all stored in a directory. Each file has large but unequal number of rows and ...
773 views

### How to perform a depth-first preorder traversal of an expression?

Due to confusion of terminology on my part I asked the wrong question before. Since it has already received other answers I shall not edit it, but instead ask the question I meant to in the first ...
43 views

### why the variable scope is not local when using evaluate to plot multicurve?

I noticed a surprising problem when using evaluate to plot multicurve, "evaluate" function actually consider global variable first, not the local! I can illustrate the problem using the following ...
88 views

### Intersection of lists of disjoint intervals

Here is my problem: I have two very large lists of intervals (stored as many couples in the form {{"start point", "end point"}, ..., {"start point", "end point"}), ...
41 views

### NDSolve fails to solve vector-valued function x'[t]=a.x[t]+u.b

I get no solution when I run the following command: NDSolve[{x'[t]==0.{{0},{0},{1.}}+{{0,1.,0.},{0,0.,1.},{0.,-0.156816,-0.523512}}.x[t],x[0]=={0,0,0}},x,{t,0,1}] ...
84 views

### Interpolation function rejected by ParametricPlot3D

I was playing around with the bouncing ball example, and decided to make a 3d version. I decided to use ParametricPlot3D for a simple independent 3D ...
82 views

### Solving an Equation (Recursively)

I have the following Values: $a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=\frac{g_2}{20};a[5]=0$. I need to compute the value of $b[n]$ in the following equation a[n]=\sum _{m=0}^{n} (m-2) \;\;a[m] ...
157 views

### Controlling the placement of the y-axis

I use ListPlot for showing the results of my numeric computation. I make my own ticks, so I never know before hand where the vertical center of my plot will be. ...
99 views

### Undirected Network and its Monte Carlo Simulation

So I have this array of points, in the form {x, {y,z}}, where x is the node number assigned when I used the locator pane to make a network, and y and z are its unitary coordinates. The graph is made ...
142 views

### Given f[1] … f[k], k = 1, 2, 3… how do one find the general function f[n]?

If I have that ...
61 views

### How do I solve for the real and complex parts of an equation simultaneously?

If I were to have an equation, say something similar to... (1-Sqrt[x - I y])/(1+Sqrt[x - I y]) = A + I B Where I = Sqrt[-1], is there a way for Mathematica to ...
1k views

### Image segmentation and object separation in 3D using Mathematica

I currently work on an image segmentation scenario to detect cell nuclei in 3D using Mathematica. The data I have are image stacks in the TIFF file format. I would like to keep the sequence of image ...
672 views

### Roughly how many times per day may WolframAlpha[] be used?

The integration of Wolfram|Alpha seems to be one of the (many!) major features of Mathematica 8. Earlier I was reading this Wolfram Blog archive and noticed quite a few articles talking about the use ...
16 views

### Is equation numbering in exported HTML considered deprecated for built in stylesheets?

So I've been tinkering around with the built in stylesheets and the Export command and I've noticed that in principle equation numbering should work. When you look ...
354 views

### How can I solve my system of differential equations?

I have a question pertaining to my code below: I require to find the values of the roots E2 that will set the function ...
58 views

### Developing easy code to apply Delta Method to generate prediction bands for custom distributions

I think that this is an interesting issue for all those who when to not only adjust one prediction function, but also to obtain the prediction bands to asses the graphical or tabular error I'm trying ...
51 views

### Inclusion-Exclusion Principle Implementation

I would like to know how I can write a Mathematica code for the Inclusion–exclusion principle. The formulas governing it are: \$ P(\bigcup_{i=1}^n A_i)=\sum_{k=1}^n (-1)^{k-1} ...
136 views

### why Level does not sort output according to their levels

Consider this example: Level[a + f[x, y^n], {0, Infinity}] (*{a, x, y, n, y^n, f[x, y^n], a + f[x, y^n]}*) Why the output is sorted in this way. why not ...