5
votes
1answer
450 views

Apply color function to matrix plot

I want to apply the following color rules to a large table of numbers. I have extracted a part of the table to use as an example. I would like to assign 5 different colors to 5 different ranges of ...
1
vote
1answer
59 views

Creating text using Table [closed]

I have a really trivial question. I want to create a table containing the text "this number = k" where k is the value of the iterator in the Table function. I tried ...
2
votes
1answer
91 views

Dynamic Syntax - Evaluate AppendTo as the second argument

I am attempting to Append a new value into my list paramMonitor whenever the value for B ...
1
vote
1answer
163 views

Simple subtraction question [duplicate]

I have two lists. a = {{2, 2}, {3, 3}, {4, 4}, {5, 5}}; b = {1, 1}; I want to subtract a from ...
0
votes
1answer
58 views

How to known exactly what color assign “TemperatureMap” to a particular value? [closed]

Usually ColorData["TemperatureMap"] is using to coloring graphs and show how near is any value to 0(Blue), 1(Red), or in the mean (White). The question is: How ...
0
votes
1answer
560 views

How to the take derivatives of a parametric function? [closed]

I have a parametric curve of the form $x(t)=2t^3+3t^2-12t,\ y(t)=2t^3+3t^2+1$ How do I take the derivative of that function in Mathematica? Is there a certain function I should use?
3
votes
2answers
414 views

How to copy a function by value?

I need to change a function symbol multiple times by assigning another symbol to it, but when I'm trying to do that the symbols overwrite each other. I'm assuming this is because the assignment is by ...
2
votes
2answers
155 views

NIntegrate - WorkingPrecision

I am trying to NIntegrate this expression. It is very close to zero, and so gives all possible types of errors. More precisely, ...
4
votes
1answer
158 views

NDSolve - sampling for result during the computation

I am using NDSolve for a Langevin dynamics problem. I want to the know long term behaviour of my system ($t>1$) but it has to be simulated with very small time steps ($dt\sim 10^{-9}$). An example ...
2
votes
2answers
99 views

Ordered indices of a multiple product or sum

Given a summation like $$\sum_{1 \leq i_1 < i_2 < \dotsc < i_k \leq n} f(i_1, i_2, \dotsc , i_k)$$ how can the lists of indices be enumerated? For example, if $n=4$ then the possible lists ...
2
votes
1answer
55 views

Using SetDelayed wih SQLExecute

I want to create a reusable line of code that I can send a column, table name and criteria to match using the WHERE clause. ...
1
vote
1answer
163 views

Expressing a joint distribution for use in ContourPlot

I have $$X_1=T + W$$ $$X_2=2 T + 3 W$$ where $$W \sim N(3,5) \,\text{;}\,\, T \sim N(1,2)$$ and $$P(X=X_1)=P(X=X_2)=\tfrac{1}{2}$$ which I have awkwardly expressed as ...
2
votes
1answer
98 views

What is “ (Dialog) Input [ ] := ” after evaluating a cell?

I have done a time-consuming run and calculation. After many hours ( about 7 hours!), the black color which shows that the cell is evaluating, turn into gray and a strange text appears like this : ...
6
votes
3answers
310 views

Riffle and Partition

At some point I noticed that I was using Riffle and Partition together a lot. I would do things like ...
5
votes
1answer
164 views

Prevent package from being opened in a notebook interface

I have a package which I need to deploy in a client's environment. It has proprietary code and solutions that I need to protect from prying eyes and inquisitive minds. The forum has discussed much ...
1
vote
1answer
120 views

Scope of variables within a Manipulate expression [duplicate]

I have a problem in defining the local variables. I have this code: ...
-1
votes
1answer
87 views

How do I count a number of primes(say smaller than N) that does not contain 5?

Title says it all. How do I count a number of primes(say smaller than N) that does not contain 5?
0
votes
1answer
75 views

nested series expansion

I have to invert the following matrix in which the functions U[t,x,y,r] and K[t,x,y,r] and all their derivatives are "small"; ...
0
votes
2answers
198 views

Kronecker delta notation

Is there an easier way to enter KroneckerDelta[n,m] in Mathematica? When I use the notation $ \delta_{n,m} $, it won't work.
0
votes
0answers
98 views

Plotting the solutions of a system of differential equations on a simplex

I want to solve and plot the solutions of the following system on the triangle simplex: x'[t] == x[t]*(2*x[t] - 2) y'[t] == y[t]*(2*x[t]) z'[t] == z[t]*(2*x[t]) ...
0
votes
1answer
54 views

Substituting a function in the output

I have to calculate the derivatives of the function K defined in the code: ...
1
vote
1answer
74 views

alignment of plots [closed]

I want to align my plots like I did with Gird[]. But you cracks here are using these short forms all the time. So, is there a way to achive this result in a better ...
0
votes
1answer
100 views

Is there a way to use pause in Manipulate?

Is there a way to do any similar to Do[Print["Iteration...", j]; Pause[1], {j, 1, 6}] with Manipulate? (to show the ...
5
votes
0answers
120 views

Is there a PrimeQ whose accuracy guarantee you can adjust?

Say I have a list of a million integers each with a million digits, and I want a crude sieve to see which have a chance at being prime. Mathematica has a PrimeQ function, which appears to be slow ...
4
votes
0answers
118 views

Given two samples, how does LocationTest select its AutomaticTest?

How does LocationTest select its "AutomaticTest" when testing two samples? Background: A previous post poses a similar question ...
21
votes
4answers
1k views

Detecting patterns of black and white stones on a 2D board

I'm writing a program to play a game of Pente, and I'm struggling with the following question: What's the best way to detect patterns on a two-dimensional board? For example, in Pente a pair of ...
0
votes
1answer
108 views

ListPlot, PlotMarker -> y value [duplicate]

at first sorry if this question is already answered. I would like to display y value as plot marker in listplot ...
2
votes
3answers
595 views

DSolve will not apply assumption m ∈ Integers

I am trying to solve a linear second order ODE using DSolve which involves an arbitrary integer m. ...
5
votes
2answers
395 views

Extracting financial indicator data from trading chart

How can the data of the directional movement index below be extracted from this chart? It seems to be embedded in some kind of dynamic module. ...
1
vote
1answer
191 views

How can I find a root of my transcendental equation near a certain point?

What function could I use to solve this equation for x: E^(-x^2) = 1 - Cos[x] I tried Solve, ...
10
votes
1answer
253 views

StringReplace, ReplaceAll and Rule interact in a bizarre way

I have the following pair of things: ClearAll[foo, labeledFoo]; labeledFoo = {"FooBarBazQuux", foo}; This works like you'd expect: ...
0
votes
1answer
84 views

How write this Function with many arguments? [duplicate]

F[x1_,x2_,...,x99_]:=expr How to write this Function in mathematica whithout complete write it?
4
votes
2answers
158 views

Solve a system of M equations without specifying M

This post has been edited heavily in response to the comments: my initial question was very confusing. I am trying to write my game-theoretic model in Wolfram Language. There is only one remaining ...
0
votes
1answer
176 views

How do I upload a graph as an adjacency list and find the betweenness centrality?

I have an undirected simple graph in a .txt file formatted as an adjacency list like this: 100 200 200 300 300 400 500 600 700 800 900 ... Every number is a node ...
0
votes
1answer
144 views

Append subscript to variable name [duplicate]

I'm importing equations from Word document and transforming them into input form. But subscripts look ugly. Is is possible to programmatically append subscript to variable name? e.g. ...
2
votes
1answer
345 views

Traces of products of Pauli matrices

Given a matrix $M$ of shape $2^L*2^L$, I would like to compute all the traces $\text{Tr}( M.(\sigma^{n_1}\otimes\sigma^{n_2}\otimes\ldots\otimes\sigma^{n_L})) $ for $n_1=1...4$, $n_2=1...4$, ..., ...
0
votes
2answers
81 views

How can I insert the current date in a text cell? [closed]

Ok I must be missing something. I have a section with the "last updated date" in a text cell, I'd like it to autoupdate. Is there a "insert current date" command hidden away in some menu?
1
vote
1answer
80 views

Optimizing evaluation time

I have the following code and it takes like foreeeeever to evaulate: ...
2
votes
2answers
374 views

How can i integrate over a set of data

i need to integrate over my data, which is denoted as {q, I},here I is the Intensity i need to obtain the form of the following integration( its not a numeric integration, because it contain x, next ...
1
vote
0answers
26 views

Minimizing roots of a transcendental equations [duplicate]

I'm trying to use the solution of FindRoot with parameters for further calculations. Annoyingly enough it always gives me trouble with replacing the parameters. As an example I'm attaching a simple ...
0
votes
1answer
87 views

Text with date, how to convert?

I use this script to recognise a date in a textfile and write the result in another file. ...
1
vote
1answer
105 views

Control which frontend session/kernel the Workbench gets attached to

(I am new to Workbench) I have 2 or 3 Mathematica frontend sessions open with a few of them running some long-running codes. When I try to open/edit a code in Workbench, I see that it sometimes it ...
1
vote
1answer
79 views

Selection of the position of the variable

I defined a function funloglogplot to make a loglogplot of a function (function1) depending on several variables ...
8
votes
1answer
644 views

How to combine more locations (GPS coordinates inside one city) with Google map?

I have a list of GPS coordinates.E.g. GPSList = {{47.680800, 17.626446}, {47.681078, 17.627283}, {47.682759, 17.631810}}; I would like to crate a Google Map ...
3
votes
1answer
144 views

Copy a variable to a specific kernel in Mathematica [closed]

I would like to copy some parameter from the main Kernel of Mathematica to the parallel kernels available. So I'm running now a command like: ...
0
votes
1answer
82 views

Define function that goes from one point to another parametrically

I have two points p1 and p2, and I want to get the parametric equation of a linear function that passes through those, but ranging from one point to another. For example, if I have 2 points {0,0} and ...
1
vote
1answer
165 views

How to set the color of plot legend independent of the plot itself

I have written the code below: ...
-2
votes
1answer
64 views

How to Show the “TemperatureMap” using Manipulate? [closed]

How to show the "TemperatureMap" in Manipulate?. ONLY the image, without text "ColorData..." ...
9
votes
3answers
903 views

Simplifying trig expressions containing Sqrt or Abs

The following Maple code can simplify abs(sin(x)) into -sin(x) given the condition ...
1
vote
0answers
34 views

Is there any simple way to zoom/magnify a selected portion of a plot (like gnuplot or xmgrace)? [duplicate]

Is there any simple way to zoom a particular portion of a plot (similar to what you can do with gnuplot or xmgrace using the magnifier and selecting a region)? Usually I do it by varying the ...

15 30 50 per page