1
vote
0answers
44 views

Inconsistent font rendering when using a remote kernel on a different OS

I have a Mathematica 10.0 on Linux and one on OSX. I'm using the OSX as a remote kernel. During parallel computation, if I render some graphics, the fonts and axes are not rendered the same way ...
1
vote
1answer
97 views

How do I solve this ODE numerically in Mathematica?

I want to solve these equations numerically in Mathematica and plot them. \begin{equation} u'(t)=1.5\,u(t)\,v(t)-u(t) \space \space \space \text{and} \space \space u(0)=0.001 \end{equation} \begin{...
8
votes
1answer
367 views

Alternative to Subsets to generate k-combinations

I need to generare a huge number of k-combinations for a quite big set of numbers (more than 100), so I would avoid Subsets because it requires too much memory (it generates all subsets at once). I ...
15
votes
2answers
220 views

How do I add my own help pages to the in-built Wolfram documentation?

How do I add my own help pages to the in-built Wolfram documentation ?
1
vote
1answer
114 views

ListPlot with checkboxes [duplicate]

I have imported data for several projects {prj1, prj2, ...} from an excel file, in form of {x,y} coordinates of points. I stored these data in variables and I would like to plot them, also having the ...
6
votes
4answers
324 views

How to combine Date and Time objects into DateTime object?

Considering a DateObject d and TimeObject t: ...
1
vote
1answer
233 views

Slider with initial value on manipulate [duplicate]

Consider this simple code Manipulate[n, {{n, 3}, 1, 5, 1}] It will produce If we click on Show-Animation-Controls button next to the slider, suddenly the ...
13
votes
0answers
96 views

Floating highlighting bug [duplicate]

Bug introduced in 10.0 and not fixed up to 10.2 At some random point in time the highlighting does not disappear any more. By highlighting I mean transparent boxes appearing for find feature ...
1
vote
1answer
245 views

DFT: why are frequencies mirrored around the frequency axis?

I want to apply Mathematica's DFT procedure, Fourier[], to a Gaussian. Why a Gaussian? Because I know the analytical result. So I define ...
4
votes
2answers
142 views

How can I use sequence in plotting domain?

I would like to plot a function but have a domain defined elsewhere as follows: xrange = Sequence[0, 2π]; Plot[Sin[x], {x, xrange}] However, this doesn't work ...
3
votes
1answer
445 views
2
votes
4answers
1k views

I need F(x,y) = xy (not x*y) e.g. x= 1, y =2 so F(x,y) = 12 [closed]

I just need F(x,y) that give me e.g. x= 1, y =2 so F(x,y) = 12 Is that possible. I tried Google but not able to find a ...
1
vote
1answer
84 views

Solving differential equation but keeping showing running

I am trying to solve this differential equation, see the command below. But the cell keeps showing that it is running without giving any answer for a very long time. Eventually I had to abort it. Does ...
1
vote
1answer
105 views

How do I display graphics in the Wolfram Language kernel? [duplicate]

I'm unable to view graphics output when working directly with the kernel from a terminal window. How do I display graphics when working that way?
0
votes
1answer
47 views

Part of longer code has an error - how can I debug?

Please can someone help me locate the problem? ...
1
vote
1answer
284 views

Efficient algorithm to generate a basis for exact diagonalization

The problem is described as follows: I need to generate a basis(matrix) in lexicographic order. For two different basis vector $\{n_1,n_2,\cdots,n_M\}$ and $\{t_1,t_2,\cdots,t_M\}$, there must exist ...
0
votes
1answer
128 views

Can't get a plot from piecewise parametric function [closed]

I can't seem get a 3D plot from r[t]. Any suggestions? ...
2
votes
1answer
98 views

Change Tensor Product symbol for aesthetically pleasing output

I'm trying to find a way of keeping an ordered list of subscripted integers which can be outputted in an aesthetically pleasing way to make analysis easier. The idea is to have a list of numbers that ...
7
votes
2answers
218 views

Speed and the MapThread function

Can anyone help explain why MapThread is so slow in this simple case? ...
8
votes
1answer
221 views

Trouble with polynomial multiplication

Bug introduced in 10.1.0 and fixed in 10.4.0 ...
9
votes
5answers
282 views

Use different markers/colors in logarithmic plot depending on sign

Suppose you have the dataset xData = Table[i, {i, 1, 30}]; yData = RandomReal[{0.995, 1.005}, 30]; and want to plot the difference of ...
4
votes
0answers
46 views

How to make a button that allow me to control a Manipulate module? [duplicate]

I'm trying to use button that allow me to control a manipulate module. Here's what I did now, it's really simple: ...
0
votes
1answer
157 views

KdV equation - wavebreaking and Galerkin method [closed]

I want to show how a wave given by the initial condition: $$ \begin{equation*} \begin{split} u(x, 0) = \left\{\def\arraystretch{1.2}% \begin{array}{@{}c@{\quad}l@{}} 1 - x^2 & \text{for $\...
7
votes
0answers
93 views

NotebookWrite a Cell with WholeCellGroupOpener option [duplicate]

Why NotebookWrite[ EvaluationNotebook[], Cell["ZZ", "Section", WholeCellGroupOpener -> True] ] produces: ...
3
votes
1answer
143 views

Intra day data with TradingChart

I am trying to use TradingChart to display some intra day data (60 s. resolution). Is there a way to modify the time displayed when moving the mouse over the data. The default setting (see top left of ...
3
votes
3answers
168 views

NDSolve and Plotting

So I am having an issue using NDSolve and plotting the function. So I have two different NDSolve calls in my plotting function. (...
1
vote
1answer
138 views

How to make a StreamPlot with three variables and two expressions

I'm trying to make a StreamPlot in Mathematica with three variables. I already have two variables, x and y, that make an ellipse via StreamPlot[{-y,x}] but I ...
26
votes
3answers
603 views

Place a small gap between axes and plot?

See for example this picture produced with R: You can see there is a small white space between the x-axis and the y-axis, so that the axes do not cross. How can I do this with Mathematica, for a ...
2
votes
0answers
101 views

When does Mathematica automatically use dispatch tables for function evaluation? [closed]

I've read the documentation for Dispatch, and it says: Lists of rules produced by assignments made with = and := are automatically optimized with dispatch ...
17
votes
3answers
3k views

Mathematica vs. Python - how does Mathematica compare to Python's scientific computing suite?

Python's family of packages for scientific computing has matured rapidly. I can pretty much replicate all of Mathematica's functionalities, but with production level and open-source code using the ...
9
votes
1answer
154 views

Naming a pattern changes outcome in StringCases[]

s = "1 2 "; StringCases[s, (n : NumberString ~~ " ") .. ] StringCases[s, (NumberString ~~ " ") .. ] yields ...
9
votes
2answers
740 views

How to draw a protractor in Mathematica

I would like to draw a protractor with Mathematica. I hope this is a fun question. Here is some start codes I tried: ...
5
votes
2answers
166 views

Speed up image coloring with ReplaceImageValue

I have about 200000 rgb-images of such format (2160*577 pixels): I want to colorize in each image some parts in white color: ...
1
vote
0answers
60 views

Defining a function with a subscripted head

How can I define a function with subscript? Forexample: f_alpha[x] = 2*x
8
votes
2answers
216 views

How to write a custom ParallelTable command that monitors progress automatically

I am using a lot of ParallelTable and want to avoid wrapping it in a Monitor call each time. Since each of the calls inside ParallelTable will already consume considerable time, I do not mind the ...
3
votes
2answers
95 views

Switching between solutions of a fourth order polynomial

I am plotting the roots of a fourth-order polynomial as a function of some parameter $r$ with the following code: ...
2
votes
1answer
108 views

Tab in Input cell

Why is it impossible to use tab to indent e.g. an inline comment i.e. (* ... *) in an Input cell? However, I have seen that it is possible, if I use Cell>ConvertTo>TextDisplay. The cell remains ...
3
votes
2answers
175 views

Format google places JSON output

I'm have some trouble formatting the Output of a 'Import' request. I get this as a return of a google places API request: ...
2
votes
1answer
82 views

Type declaration for list arguments

How can I make f[n_Integer]=2*n valid for a list of integers? For example: f[nlist_Integer] := 2*nlist[[1]] does not work ...
-1
votes
1answer
88 views

rolling a sum of 6 or less, on 3 dice [closed]

What is the probability of rolling a sum of 6 or less when rolling 3 dice(six sided) at once. I understand how to get the probability of rolling the sum of 6 but of 6 or less confuses me.
3
votes
1answer
59 views

Behavior of code changes after a palette is installed

Please consider the toy code here: ...
2
votes
2answers
169 views

How can I partially evaluate a function?

I have a multivariable function, from which I'd like to define a marginalization: f(a,b,c,d,...,z) ---> g(a,1,c,d,...,z) Generally, g will have fewer argument than f, possibly none (full evaluation)....
3
votes
2answers
124 views

How to show and hide text by a button

I'm trying to implement a button that can show and hide output text in a panel/tab, but I can't find a specific command to do that. I tried StringReplace, but it doesn't work for me.
0
votes
1answer
64 views

Custom headers - RunningText bug?

I'm trying to get MMA ready for writing papers and I'm almost there. At first it looked like there was plenty of space for customization with custom headers and footers, but then it turned out that I ...
3
votes
1answer
87 views

Duotone plots with cyan and black

What's the typical way to make Mathematica plots use purely cyan and black? Maybe there's a fairly standard method, since publishers often require this? It also seems like some plot types take ...
0
votes
1answer
124 views

How do I store Eigenvalues of a 14*14 matrix in a For loop into an array and then plot that array? [closed]

I have a matrix 14*14 that is dependent on parameter a. How can I plot eigenvalues of the matrix according to varous values of a?
2
votes
5answers
259 views

Add values from a list, at positions from a list, to a matrix

I'm investigating matrix assembly and one of the things I'm trying to do is add specific values to a larger matrix based on a list which is essentially defining connectivity of nodes. For example: ...
2
votes
0answers
117 views

Different solutions for seemingly same Integral

I want to evaluate the following integral: $$\int_{\left(1-\sqrt{a}\right)^{2}}^{\left(1+\sqrt{a}\right)^{2}} \frac{1}{2\pi x}\sqrt{\left(\left(1+\sqrt{a}\right)^{2}-x\right)\left(x-\left(1-\sqrt{a}\...
4
votes
1answer
131 views

Substituting ParametricNDSolve for NDSolve

This is my first post so let me know if I need to format things differently. I have been using NDSolve for most problems which optimize parameters for ODEs. I believe that ParametricNDSolve would be ...

15 30 50 per page