5
votes
4answers
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 ...
1
vote
1answer
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. ...
0
votes
0answers
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 ...
2
votes
3answers
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$ ...
2
votes
3answers
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: ...
2
votes
4answers
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 ...
2
votes
1answer
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 ...
1
vote
1answer
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: ...
3
votes
2answers
43 views

How to insert zero counts uniformly with Dataset Counts query

Missing[] is generated when an association does not contain the specified key. ...
2
votes
3answers
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, ...
2
votes
5answers
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, ...
1
vote
2answers
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: ...
2
votes
0answers
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 ...
0
votes
0answers
14 views
2
votes
2answers
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 ...
4
votes
1answer
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: ...
2
votes
1answer
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 ...
3
votes
2answers
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|$.
6
votes
4answers
196 views
20
votes
3answers
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 ...
0
votes
0answers
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: ...
0
votes
0answers
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: ...
0
votes
1answer
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. ...
2
votes
1answer
46 views

FindDistributionParameters of a sum of a mixture distribution

I have this Mixture Distribution of two Normal Distributions: ...
1
vote
1answer
33 views
4
votes
1answer
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 ...
0
votes
0answers
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 ...
3
votes
3answers
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 ...
2
votes
1answer
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, ...
3
votes
2answers
135 views

Using ReplaceAll to replace a head

Why would this work to replace the head b with newHead: ...
2
votes
1answer
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 ...
14
votes
5answers
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 ...
1
vote
2answers
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 ...
6
votes
3answers
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"}), ...
2
votes
0answers
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}] ...
2
votes
1answer
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 ...
0
votes
2answers
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] ...
3
votes
4answers
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. ...
3
votes
0answers
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 ...
1
vote
1answer
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 ...
40
votes
2answers
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 ...
20
votes
2answers
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 ...
1
vote
0answers
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 ...
2
votes
1answer
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 ...
1
vote
0answers
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 ...
0
votes
1answer
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} ...
3
votes
1answer
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 ...
2
votes
1answer
47 views

Changing Wolfram command line output into copyable text

I generated a long polynomial using the Wolfram command line, with divisions and exponents. But the divisions look like this: 4 - 5 And the exponents are on a ...
18
votes
6answers
711 views

How to perform a breadth-first traversal of an expression?

Mathematica provides functions that perform a depth-first traversal, or which use such a traversal, including: Scan, Count, ...

15 30 50 per page