# All Questions

66 views

### RandomSample Bug?

I was using RandomSample with very skewed weights. I am asking for a random sample of 6 numbers 1 through 100 without replacement. In the screen shown, the weights for 1 through 6 are 100 000, with ...
38 views

### Type Vietnamese in Mathematica

I type Vietnamese using UTF-8 Encoding but Text Display got error. How to type Vietnamese, Chinese in Mathematica. Please help me.
45 views

### Optimise CPU-intensive list combining function

I have a list of numbers list1 from which I want to create another list (list2) consisting of only those numbers that are equal ...
20 views

### Set Image Size and Page Orientation When Exporting to PDF

I want to export my plots (plot1 and plot2) as a pdf file. Since plot1 contains 4 figures in matrix form, so it will not fit in one page. ...
58 views

### Integrating a Simple Piecewise Function

If I define f[x_]:=If[x<0,-1,1] and then integrate,say Integrate[f[x],{x,-3,7}] I get what I expect, namely 4. But ...
92 views

### Gather lists according to another list

I have a first list of pairs like this one: ...
62 views

### How to plot a decahedron with Mathematica?

I wrote Graphics3D[{Opacity[.9], FaceForm[Yellow], PolyhedronData["Dipyramid", "Faces"]}] and I get this picture: I would like to plot a decahedron without ...
39 views

### Why has my syntax coloring changed?

Local variables in Module are no longer specially colored for me, but other syntax coloring remains, for example iterators in a ...
32 views

### Find the coefficients of a set of expressions in partial-derivatives [closed]

Is there a way to find the coefficients of these (terms within the square brackets) expressions using mathematica? \begin{align} \hat{l}^2=&\sum\limits_{a=1}^{4}\left[\left(\frac{\partial ...
22 views

### Derivative with respect to certain variable. [closed]

How would anyone calculate this derivative using mathmatica?? More specific with respect to dln(alfa)
30 views

### Generating the set of all three-dimensional binary arrays distinct under rotation and reflection?

How can I automatically generate all possible three-dimensional binary arrays of size $(x_1 \times x_2 \times x_3$) where each array is distinct from all others with respect to rotation and reflection ...
202 views

### Why do Mathematica and Maple give different results? [on hold]

I would not ask this question if I thought it was merely a matter of getting someone to check my work, that I had entered the problem into each software the same, etc. However, I have been over both ...
39 views

### Generalizing Characters to n-character substrings

I'm doing some frequency analysis on an encrypted plaintext. Tally[] and Characters[] make the basic task quite easy. To count the number of times each character appears (sorted alphabetically; ...
66 views

### Poincaré section for 3BP

I try to plot the Poincaré section for the 3BP i use the following code that works very well: ...
37 views

### NDSolve::ndsz:At t==0.000039576, step size is effectively zero

I adjusted my code accordinly to the advice I got. However I still have a problem with this code which now looks like this: ...
34 views

### Autocomplete from inside Module and SetDelayed

Autocomplete in Mathematica 9 offers suggestions from inside SetDelayed and Module. For example, after running: ...
112 views

### Fit data with linear combinations of Cos and Sin

Recall that if $f$ is a piecewise continuous function on the interval $[-\pi, \pi]$, then the Fourier series of $f$ is $$f(x) = \sum_{n=0}^{\infty} (a_n \cos(nx) + b_n \sin(nx)).$$ See for example, ...
59 views

### Plotting 4D phase portrait and basins of attraction

I have a four dimensional vector x={x1,x2,x3,x4} and 4x4 matrix A. I also have four replicator equations below: x1'= x1.((A.x)[[1]] - x.A .x) x2'= x2.((A.x)[[2]] - x.A .x) x3'= x3.((A.x)[[3]] - x.A ...
46 views

### Temparture/date histogram

For our homework, I need to make a histogram for average temperature in one place from 1955.1.1 to 2014.1.1 for each day in that time interval . The data is give in na a text format which i can import ...
34 views

### Notation package: parenthesis placement for SuperscriptBox

The question concerns the Notation package. I want to define notation for the function very similar to the built-in Power[a,b] ...
185 views

### Result about Context is inconsistent with the description of “Power Programming with Mathematica”

x = 5; tempx = 6; Begin["temp"] {x, Globalx, tempx} The result in my Mathematica session is {5,5,6}, but it's ...
67 views

### How to numerically integrate this integral?

I want to integrate the function funcin (spherical coordinates). ...
41 views

### Integrate with FunctionInterpolation differs from NIntegrate

In working with interpolating functions and integration, I noticed a lot of differences between NIntegrate and Integrate in the ...
130 views

### Extracting function calls from an expression

I have an expression like this: expr = F[0, 1] + 2 F[0, 0] - 17*F[2, 0] and I want to transform it to a list consisting of all function calls with its arguments: ...
65 views

### Custom highlighting in definitions

Suppose we defined a pattern with custom pattern name provided by user, like Quiet[myCustomPattern@terms_ := f[terms : (_[_, _])..]] for use in further ...
31 views

### How to plot data of complex numers [duplicate]

Here I have some output calculated for different values of some parameter. I want to plot these points in complex plane Re, Im and present them with ListLinePLot. How can I do that, I tried many times ...
42 views

### Standard deviation of data having some peaks [closed]

How to calculate the standard deviation of data which have some peaks...like 2,2,2,3,4,3,2,11,2,3,2,2,3,11,11,11,2,3,4,11. Mean should be near 3. 11 is considered as peak. What should be done in ...
94 views

### Breaks in plot & blank plots

Almost as a follow on from this old question, I am having similar problems again, with slight difference, that if the values are small enough, a completely blank plot is produced. ...
48 views

### Generating random images in Mathematica [closed]

This semester, I am TAing a course in which the students are going to write a photo sharing web app similar to Instagram for their term project. To test the performance of their apps, they need a ...
63 views

### Where do Mathematica's probability functions draw a line in the sand for predicates?

Thinking about a recent question mis-posted here (belonged on math), I noted the following. A contrived example - probability that a or b are 1: ...
180 views

### MATLAB to Mathematica: coneplot

Does Mathematica have a function, similar to the one called coneplot in MatLAB? Given some spatial coordinates $x, y, z$ and velocity components $v_x,v_y,v_z$, it ...
23 views

### g00 (metric tensor) not explicitly evaluated in FeynCalc

I am learning Mathematica and FeynCalc by doing some basic cross section calculations. I have an issue with trace calculations: When I plug in for instance the ...
182 views

### Working with symmetric polynomials

I have a question related to working with symmetric polynomials in some variables. Let us say, I have an expression ...
129 views

### Generating high quality charts in Mathematica for use in LaTeX and Word

I frequently have a probelem using my charts in reports because the text (axes labels and tick marks) look low resolution (fuzzy). When I export my charts, i export them as PNG files. Unless I'm ...
23 views

### Solve the probability problem [closed]

A four digit number is chosen at random.The probability that there are exactly two zeros in that number is ?
43 views

### Variance/Standard Deviation with a Constant Vaule

When applying variance (Variance[10]) or standard deviation (StandardDeviation[10]) to a constant value in Mathematica, Should ...
51 views

### Plotting the discrete solution to a PDE

So I went through all the grunt work of solving a PDE in discrete form for a research project. Now I have a Temperature solution as a function of time and space:  T_{i}^{n+1}=\left( \dfrac ...
62 views

### How to obtain differential equations of motion using Lagrangian dynamics?

I'm confused to find a set of differential equations of motion of a pair of masses, m1 and m2 joined by a spring of constant ...
44 views

### How to mathematically represent MMA 9 Spikey?

I am trying to figure out how to mathematically represent the MMA 9 Spikey in order to send to a 3D printer. According to this page, " In particular, spikeys for version 2 and up are based on a ...
19 views

### How do I pull from a data list for parameter values in a system of ODEs and then solve and plot?

I have a parameter set list and I would like to solve a system of ODEs multiple times using each parameter set in the list. Then I would like each set of solutions to be graphed on the same plot. ...
34 views

### grid lines in Manipulate plots are not showing up when first rendered?

I have a Manipulate within which the plot does not render completely initially: ...
150 views

### Draw generalized k-ellipse using “the locus of points so that sum of the distances to the foci is constant” deffinition

My goal is to draw a family (for different distances) of 3-ellipse for equilateral set of foci. 3-ellipse definition is: "the locus of points so that sum of the distances to the three foci is ...
57 views

### Replace matrix with conditions

I want to replace the values of 1. in slot under the condition that the year and month in basevalue and ...
74 views

### Algorithm in RandomChoice[{w1,w2,…}->{e1,e2,…},n]?

I wonder if someone happens to know the actual algorithm implemented in the particular overload of RandomChoice that handles explicitly presented discrete ...
53 views

### Plotting solutions of differential equations with different parameters

I want to plot x[t], when i manipulate w from 0.1 to 1.5. Here is what I've attempted, which does not work as expected. ...
53 views

### How to solve an inequality

I am trying to solve the following inequality: Assuming[{R[k] >= 0, R[k + 1] = R[k] - 2^N Y, Y >= 0 && N >= 0}, Refine[Re[R[k + 1] >= 0]] I ...
55 views

### Skewness of distribution vs. skewness of distribution's PDF

I'm having trouble understanding why the skewness of built-in distributions is not the same as the skewness of their probability density functions. For example, the following are different (the first ...
36 views

### Plot graphs in different colors

I am generating a set of plots and exploring how changing a parameter affects the plot shape. I want each plot to be a different color, but the color rule i'm applying seems to only work for the last ...