# All Questions

74 views

### Is the MaximalBy function still used [on hold]

On the mathematica reference website it gives examples using the MaximalBy function, However when I am using it, I see no desired output. This leads me to wonder if mathematica has stopped using this ...
135 views

### Plot a one-dimensional list of numbers as a column/row of labeled colored squares

I have a list of numbers and a matching list of labels. I want to plot a column of colored squares, with the color of each square matching (in some color scale) the value of the corresponding number. ...
46 views

93 views

### How to do a region plot with many functions [duplicate]

Hello i am trying to compare many function, i want to see witch one as the lowest value depending on 2 variables. My solution so far is something like this: I have 7 function: P1 P2 P3 P4 P5 P6 P7, ...
11 views

### Applying chain rule to evaluate a derivative when the component function is not differentiable at one point [migrated]

I got the following question. Can anyone help me? Thanks! Y is a smooth function of X. and X is a function of r, which kinks at r=r0, but is smooth everywhere else. I was try to compute dY/dX at ...
42 views

### Extract the minimum positive root from a quintic [closed]

I need to compute the values of ϵϵ and x2 from the following sytem: ...
77 views

### plot $f(x)$ against $\frac{1}{x}$ [closed]

Hi guys this is really a simple question: if i have $f(x)$ how do i plot this function in mathematica against, for example, $\frac{1}{x}$? thanks in advance
507 views

### UnFlatten an array into a ragged matrix

Trying to unflatten an array that was part of ragged array of sub matrices. As input we have flattened array: ...
51 views

### Recursive function with array of variables

I am trying to create a recursive function which works with an increasing array of variables. Since the formula is quite complex, i will try to simplify my example to the core of my problem. The ...
27 views

### Conditions for proper integrals with DSolve on Mathematica

DSolve[{RCS'[s] == SNPH[s] - Sqrt[R2[s] - RCS[s]^2]/b,SNPH'[s] == RCS[s]/a^2, R2'[s] == 2 RCS[s] SNPH[s], RCS[0] == 0., SNPH[0] == snal, R2[0] == ri2}, {RCS, SNPH, R2}, s ]; Here {a,b,snal,r12} are ...
2k views

### Distance between point and line segments

How would you determine the shortest distance between a point and one or more segments? For example, what is the shortest distance between the point and the two segments below? Clearly the point is ...
569 views

373 views

### Specifying parts from lists for plotting using Show

I have the following data: ...
196 views

### Testing for primality in quadratic rings?

Testing for primality in $\mathbb{Z}[\sqrt{-1}]$ in Mathematica is easy: PrimeQ[n, GaussianIntegers -> True] But how can I test for primality in, say, ...
6k views

### Resources for beautiful Mathematica Stylesheets

When the Wolfram Demonstrations were introduced and the Documentation-Center was redesigned, I remember it was the first time I thought someone had put some effort into creating a beautiful ...
3k views

### Performing a chi-square goodness of fit test

How would I perform a chi-square goodness of fit test? I have tried the following, where my data consists of the observed values whilst the data pair contains the correct values. Then I use the ...
2k views

### Doing a chi-square independence test in Mathematica

I have a matrix consisting of the following data: Needs["HypothesisTesting`"] data = {{11, 206}, {32, 1374}} How would I make a chi-square independence test ...
6k views

### How to compile effectively?

What are the best practices of compiling functions? I understand that this is a vague question, but let me list some aspects that might trigger useful answers. Some of these have already been answered ...
579 views

### Toolbars in Mathematica

Mathematica seriously lacks some useful toolbars. I wonder why keeping a totally barebone gui is part of WRI's policy? Would such a feature be so platform-specific that it does not worth design it? I ...
2k views

### Is it possible to speed up ContourPlot on multi-core machines?

It is not very difficult to face a function for which ContourPlot works too slow. And it seems natural that this function can be parallelized well. Anyway, naive ...
1k views

### Saving a notebook as PDF, preserving syntax highlighting

Currently, one may save notebooks as PDFs from the menu by Save As... and then selecting PDF (on a Mac, I imagine it is similar on other OSs). However, the ...
2k views

### Adaptive sampling for slow to compute functions in 2D

EDIT: Although I have posted an answer based on my current progress, this in incomplete. Please see the "open issues" section in the answer. Most plotting functions in Mathematica adjust the ...