0
votes
0answers
9 views

How to use shell commands inside mathematica

I want to know how to use simple shell commands inside mathematica. For example: I want to set the current directory as the NotebookDirectory using shell command PWD. Something like ...
0
votes
0answers
20 views

Plot 4d data with slider from a csv

How can I plot 4d data from a csv, using a slider for the 4th variable? The data is in a csv like this: f x y z 1.2 2.2 3.0 -3.2 2.1 -1.0 3.1 2.3 ... How can I ...
0
votes
0answers
15 views

How Defer[1+Evaluate[1+1] work?

I want to generate some expressions. The expression is not evaluated expect some parts will evaluate first. A simple example is Defer[1+1+1] and in this expression ...
-1
votes
1answer
82 views

How to overload the operator “*” as KroneckerProduct [on hold]

Can I use the expression below a * b * c * d for short to instead KroneckerProduct[a,b,c,d] automatically when a,b,c,d are ...
0
votes
0answers
23 views
0
votes
0answers
17 views

Defining functional elements of a matrix with a list

Say I have a function f[i,j] and I have specific values for i and j, (a,b,c...) I'd like to create a matrix or table: f[a,a] f[a,b] f[a,c] f[b,a] f[b,b] f[b,c] f[c,a] f[c,b] f[c,c] etc... I'd ...
0
votes
2answers
35 views

How do I create a recursive tree plot for the Fibonacci sequence?

I would like to create a plot that shows the recursive tree for the nth number of the fibonacci sequence, as the one below. http://faculty.ycp.edu/~dhovemey/fall2005/cs102/lecture/fib5.png Ideally, ...
2
votes
1answer
55 views

Algorithm for determining factorability

Consider the following polynomial : $P[x,y]:=a_{11}+a_{12}y+a_{13}y^2+a_{21}x+a_{22}x y+a_{23}x y^2+a_{31}x^2+a_{32}x^2 y+a_{33}x^2 y^2$ where the $a_{ij}$ are either $1$ or $-1$. Thus there are ...
6
votes
5answers
642 views

How to replace a space by a comma

in this expression = "{1 2 3 4 5 6 7 8}", I want to replace each space by a comma , to get ...
0
votes
0answers
25 views
6
votes
4answers
186 views

Getting AbsoluteTiming to display in hours, minutes, and seconds

I'm doing some extended length calculations and was wondering how I could get AbsoluteTiming to display in hours, minutes, and seconds. I googled and found nothing, ...
1
vote
2answers
101 views

How to force a replacement in an order that I want?

This is a follow-up to this question. I have a big sum, with lots of terms of the form ...
0
votes
1answer
59 views

insert comma between numbers [duplicate]

I have the following numbers rows and I want to insert a comma between the numbers? 6 7 9 51 64 68 79 102 116 128 148 155 184 202 273 283 292 1 7 8 10 52 65 69 80 103 117 129 149 ...
0
votes
1answer
70 views

Defining arbitrary Lagrangian

I'm trying to compute some general questions to a given Lagrangian. The idea is that I need to compute: $\qquad L = \sqrt{\det(g)}$ With $g_{\alpha \beta} = G_{MN} \partial_\alpha X^M ...
0
votes
1answer
21 views

DSolve with coefficients and assumptions

The command below: DSolve[{s'[t] == l t, s[0] == 0}, {s[t]}, {t, 0, a}] gives the error DSolve::alliv: The function ...
-2
votes
1answer
35 views

Calculate column number from alphabetic column reference in Excel [duplicate]

Here's a fun brain teaser. Can you give me a mathematical equation to calculate the column number of a Microsoft Excel column, given the alphabetic column reference? Let X, Y, & Z represent the ...
0
votes
0answers
41 views

How to do this integral of Hypergeometric functions in Mathematica?

I've tried to integrate by part, but it seems that Mathematica is still not able to integrate. ...
3
votes
1answer
50 views

Calculating sum of BesselJ[n, x]

My friend has a sum in his research paper that looks like this $$ \sum_{n=-\infty}^{\infty}\frac{J_n^2(x)}{n-\kappa}. $$ He was able to calculate this sum analytically, by substituting the denominator ...
1
vote
1answer
21 views

A natural syntax for a Query that holds

Often I have an unevaluated expression in a RuleDelayed Key-Value pair and subsequently want ...
0
votes
1answer
25 views

How to save the caching produced in processing

As my this previous post.I get a custom function which can help me got some function contain a certain option.And I have put it in my "init.m" file. ...
0
votes
0answers
18 views

NDsolve memory leak

Every time I run NDsolve it uses some memory that I am not able to free later. The following is an example code based on the spring equation (Hooke's law) that ...
1
vote
0answers
24 views

How to add echo to audio file?

After importing a sound file, how can I add an echo to it? sound = Import["test.wav", "SampleRate"] It needs to be apply after time specified by user. This is ...
1
vote
1answer
72 views
+100

How to make a disconnected graph to be 1-edge-connected(but not 2-edge-connected) with some shortest edge

Assume I have a graph.You can run following code to get it. Import["http://goo.gl/NaH6rM"]["http://i.stack.imgur.com/EyAKW.png"] It is a disconnected graph.But ...
7
votes
2answers
101 views
+50

What does the symbol Continuation do?

There is a symbol Continuation (residing in the System` context). There is no usage or documentation for this symbol. ...
2
votes
1answer
63 views

Symbolic vector addition

I'm trying to figure out a nice way to add a mix of symbolic and explicit vectors/matrices without mathematica treating the symbolic vectors as scalars and promoting them to constant arrays. For ...
1
vote
1answer
39 views

Is there parallel/simultaneous substitution in Mathematica?

I know this is simple but I'm not proficient at Mathematica and cannot seem to find it online or in the help. Also, Replace[] says it does the assignments in order, ...
-1
votes
1answer
71 views

How does one check a function monotonicity?

http://i.stack.imgur.com/JOS9o.png the question is to analyze $f(x)$ for monotonicity. I know I need to use D[f[x], x] and check if it is less than or greater to ...
0
votes
1answer
129 views

Trouble solving a system of 2 ODE's with NDSolve

I'm trying to solve a system of two coupled second-order ordinary differential equations using Mathematica's NDSolve. The functions of r that appear in the equations are ...
2
votes
1answer
71 views

Way to simplify an inequality with many variables

my problem is the following: I have three inequalities in five variables $x,u,a,b,c\in \mathbb{R},x>0 $: ...
1
vote
0answers
26 views

How to export the high resolution animation movie?

I would like to export high resolution animation Here is the code: ...
9
votes
2answers
94 views

Why are some of the isomorphisms not bijective?

Bug introduced in 10.4 Mathematica computes all the isomorphisms between graph g1 and g2: ...
0
votes
0answers
21 views

How to copy pixels indexes simultaneously from a list of images

I have a list of images which contain a box. The box is translated from an image to an other. I want to copy the indices of box corners from simultaneously from the list of image. I am wondering if ...
0
votes
0answers
29 views

Manipulate ListLinePlot for parameter definition out of scope

I would like to generate a ListLinePlot which data generated from the following functions: ...
3
votes
2answers
117 views

How to Convert a Matrix into an Association?

I have a matrix like this one: test = {{1, "a"}, {3, "b"}} and I want to convert it into an association like this ...
2
votes
1answer
54 views

Using Minuit2 to minimize a Mathematica function

FindMinimum is great, but sometimes it is difficult to get an idea of the uncertainties and intermediate evaluation diagnostics. How to define a function in ...
0
votes
0answers
25 views

Table of values for the specific channel of the sound

I want to write a function that takes sound data and number as input and gives back table of values for the specific channel of that sound. I have 2-channel sound: ...
2
votes
0answers
34 views

What are the differences among Graphics, Raster, Image, List(ImageData) in Mathematica in terms of Head?

I do not know the exact conceptions of Graphics,Raster,Image,List(ImageData). I have only dealt with and used them in ...
-2
votes
0answers
39 views

Panel Regression in Mathematica

I need to do pretty much the most simple panel regression imaginable. I am working with a few variables. Some of them are random variables, so I am going to use a more traditional form of regression ...
2
votes
1answer
41 views

How to overlay ListPlot on a ContourPlot with correct range?

I am trying to superimpose a scatter (Listplot) on a contour plot. If p1 is a contour plot and p2 is a scatter plot imported from some data, how do I plot them on top of each other? I tried Show and ...
0
votes
1answer
43 views

Exporting formatted numbers [duplicate]

I would like to format numbers of a list and write them in columns to file. ...
15
votes
1answer
428 views

Calculating probabilities symbolically

Is there a way to solve for statistical quantities analytically/symbolically in Mathematica? example 1: Lets say that I want to do a calculation that requires Bayes theorem. I know p(a), p(b) and ...
1
vote
1answer
20 views

'Contingent' user interface (DialogNotebook with PopupMenus that depend on previous PopupMenus)

I'm creating a user interface for data entry. It makes sense for the content of certain menu items to depend on the information that has been entered earlier on the form. In a trivial example, ...
2
votes
1answer
151 views

How would one plot a multivariable function over several disjoint domains?

I would like to plot Scherk's 1st Surface which is defined on a checkerboard of the plane, e.g. $-\frac{\pi}{2} < x < \frac{\pi}{2}, -\frac{\pi}{2} < y < \frac{\pi}{2}$ and $\frac{\pi}{2} ...
0
votes
0answers
100 views

Find coordinate {x, y, z} where two functions are minimal

I am trying to find a point in a ListPointPlot where the total RegionDistance is minimal AND the total differences of the ...
0
votes
3answers
50 views

Maximum value of a function using loops

I have a function ab+bc+a/c, where a,b and c ranges from 1 to 5.I have to get an output of maximum value of this function and the values of a,b and c which give that maximum value. Is it possible to ...
1
vote
2answers
109 views

How to plot a lattice (2D or 3D) given a basis

I want a graphical picture of a lattice with basis such as $\{(1,1), (\sqrt{2}, -\sqrt{2})\}$. Does Mathematica already have a pre-made function that finds all linear combinations over $\mathbb{Z}$ ...
2
votes
1answer
36 views

FourierTransform a function doesn't give result when variable is 0

I am trying to get a Fourier Transform of a function. However it doesn' work when the variable is 0. I used Mathematica 8.0 on a Windows Server 2008 R2 system. The code is as follows: Defining ...
0
votes
0answers
38 views

How to get ContourPlot3D to run involving elliptic functions?

I need to plot zeroes of a function of three variables that involves elliptic functions. For example, I have ...
1
vote
0answers
25 views

Setting different B.C. for different fields in NDSolve

My question regards construction of a PDE solver for several fields, with different type of boundary conditions for several fields. Say I have the following set of equations: $$ ...

15 30 50 per page