All Questions

31 views

How to make Expand work right in a function definition?

This works just fine: Derivative[n_, 1][g][x_, v_] := D[g[x, v], {x, n + 2}]/2 + D[D[g[x, v], x]^2/2, {x, n}]; h = Expand[D[g[x, v], {v, 3}]] I would like to ...
193 views

Parentheses for negative integers

Trying to standard create prime factors presentation, but can't seem to remove the parentheses: ...
113 views

Why Abs[Infinity] is an element of the real numbers

Element[Abs[Infinity], Complexes] returns False, that's right. But ...
141 views

Compare two shifted signals

I have one set of original data (signal A) and a second set of derived data (signal B) which was computed from A by position rotation (circular shift). Here are the data for the signals (A and B): ...
114 views

How can I number the section titles automatically in Mathematica?

When I write a document in Mathematica, I do not like to number the section title myself, because I usually add or delete a section from time to time. Is there a way that Mathematica can number the ...
83 views

Unequal behaviour of FindRoot to two similar functions

Unfortunately, I have some difficulties to plot a function. Here is my code: ...
390 views

Get 2d corner coordinates / layout using edge detection

I'm new to Mathematica but I found an interesting usage of it: I'm programming a 2D game, with a top-view, where I'd like to have the edge coordinates of the walls. EdgeDetection delivers me quite a ...
87 views

symbolic integration of product of hankel function and trignometric function

I want to perform the following integration. my function is : r*cos(r)hankel(0,kr) i want to integrate from 0->pi , and want to get the expression in terms of k. I used this command ...
59 views

Finding list position in array [closed]

Lets say I have the list {{1,2},{1,3},{2,4},{1,3,5}} Is there a way I can get the positions of the lists starting with 1? ...
59 views

SetDelayed::write is Protected error on Linux not PC

I have 2 computers, a PC and an Ubuntu computer both with Mathematica 10. I am running the exact file with the exact support files on both computers, but just on the Ubuntu I get the following error ...
44 views

Should this be equal to Gamma function or not?

I define the following function: Nat2[s_] := InverseFourierTransform[FourierTransform[1/t, t, w] (-I w)^(s - 1), w, x]/Cos[Pi (s - 1)] /. x -> 1 I expected ...
170 views

Simple pattern/texture on chart elements [duplicate]

If I print the following BarChart in black and white, then it is very difficult to tell which bar is "a" and which is "b". ...
133 views

Nested Recursion Equation

I have been trying to solve a "nested recursion equation" using Mathematica. However, when I do something like this: ...
130 views

Manipulate causing frequent crashes

I am putting together a dynamic 3D plot which is to be "manipulated". The code does what I want it to, but keeps crashing all the time. Sometimes it crashes the kernel, so I just have to run the ...
75 views

How to export quicktime video as h.264? [duplicate]

I am trying to export sequences of images as quicktime movies. The dafault codec (cinepak) produces low quality and large file sizes. There is little documentation of the other codecs, which can be ...
130 views

Eigensystem on HPC

I am submitting Mathematica jobs to an HPC. I have a large matrix that is a function of (x,y) and I am diagonalizing it for around 500 points in the plane. My initial idea was to request a node with ...
96 views

Modifying a list of matrices with conditional statement

I have a list of around 100 matrices, that looks like this ...
65 views

How to invoke default VertexShapeFunction and EdgeShapeFunction from custom ones?

For this question, g is a Graph object (of order ~2K) such that the VertexWeight and ...
61 views

Importing file as a string causes a puzzle

I generate simple txt file and import it as follows: a = Import["binary.txt"]; b = Import["binary.txt", "String"]. It appears then that lengths of imported strings ...
447 views

Poisson PDE over a irregular region with FDM

The problem modeled by the Poisson PDE is related to the torsion of prismatic beams and I use the Finite Differences Method (FDM). I've managed to solve the equation over a rectangle region with ...
100 views

Expand just first level of an expression

Is there a way to build a function to expand just the first level of powers and products of an expression? Edit: ...
110 views

Visualisation of intrinsic curvature [duplicate]

I know that Mathematica allows for a lot of nice visualisations, so here I am. I was thinking if one could visualise (using Mathematica) the fact that a 3d (or simpler a 2d one) Torus doesn't have ...
312 views

Why does the documentation call functions “pure”?

Clearly, functions in mathematica are not pure functions according to the definition on Wikipedia (no side effects - basically implementabe with table lookups): ...
92 views

Simulating Dynamic Priority Queues [closed]

I have found several examples of static priority queue implementations: there are two classes of items, with the exponential interarrival times. The service times are also exponential. The first-class ...
256 views

How can I call the R-programming packages in my Mathematica?

I am trying to call the R-programming package called highfrequency in my Mathematica so that I can use its function rCov. I ...
74 views

Concise way to express Table[FactorInteger[300][[n, 2]], {n, 1, Length @ FactorInteger[300]}] [closed]

I can get the exponent part of FactorInteger[300] with Table[FactorInteger[300][[n, 2]], {n, 1, Length @ FactorInteger[300]}] ...
89 views

Mathematica integration error

Integrate[Integrate[Abs[Exp[2*Pi*I*x] + Exp[2*Pi*I*y]], {x, 0, 1}], {y, 0, 1}] yields 0 as result. This cannot be correct, ...
125 views

Removing non-word characters in certain parts of a string

I would like to ask how I can remove non-word characters from a string, but only in certain cases. I have read this article, so I know how to get the words out of a string. My text is however a bit ...
119 views

Exporting animated gifs; “AnimationRepetitions”->1 doesn't work

I'm trying to export a table of graphics into a gif animated file with just one repetition. Export["C:\Race.gif", t, "AnimationRepetitions" -> 1] It doesn't ...
150 views

Integration not working, can I find a closed form?

I have tried: ...
229 views

How could I upload a XLS file to Cloud and then plot it?

Bug introduced in 10.0 and persisting through 10.0 or later I want to upload a file to the Wolfram Cloud and plot the list: So I use the following code to check its head at the beginning: ...
435 views

Computing a map between two lists

What I want is a little difficult to explain. So I try to it with an example. I have 2 lists, each of which has $(n-1)^2$ elements. Each element is an integers between 0 and $n-1$, inclusive. For ...
50 views

Put/Get don't accept a string-valued expression as filename [duplicate]

I'm trying to do the following with an expression: filename=StringJoin[{"myfile", ToString[someNumber],".m"}]; expression >> filename; But mathematica ...
127 views

Histogram from a list of matrices

I have a list of around 100 matrices, that looks like this ...
189 views

Grid lines extending too far

The grid lines in the following plot extend beyond the data and, in particular, into the numbers along the axis. ...
147 views

How to automatically Import, Name and Export multiple images? [duplicate]

I have a directory (myDataDir) full of images ("myImage1.tif", "myImage2.tif", ...), and I ...
102 views

Wrong Definite Integral result [closed]

When I calculate the definite integrate of (a+bt)*cos(nt). Integrate[(a + b t) Cos[n t], {t, t1, t2}] MMA gives a correct answer: ...
353 views

Using RegionPlot3D to make a cone under restrictions

I have to plot a cone that satisfies this statement: Use the RegionPlot3D command to draw a picture of a cone with its point at the origin. The other end of the cone is a circle with radius 5 ...
40 views

Using real numbers gives suspicious result [closed]

In the code below when I use a real number for number 4 in the exponent in the irf function, it returns wrong result. ...
890 views

How to wrap a plot around a circle?

Consider the code a = Table[BesselJ[i, x], {i, 0, 3}] Plot[a, {x, 0, 20}, Axes -> False] producing I'd like to transform the plot into a circle. In other ...
68 views

Problem in Plot at start [duplicate]

The derivative can be used to calculate roots. However the same function cannot be plotted.The error is at start point of domain: ...
43 views

Mapping also for one element (or telling it how to do so if head got changed)

Some code generates a polynomial, and has the form: expr = Plus[a[i],b[i],c[i],d[i]] I need to apply f to each term. To do ...
56 views

Handling Accuracy and Simplifying

I have the following problem. I have a system of non-linear equations that I log-linearize around a certain point, let's call it point A, using a function that I ...
469 views