Questions on writing non-trivial programs in Mathematica. Do not use this tag for questions on plotting/graphics or for questions on doing mathematics with Mathematica, where the focus is more on the math than the program.

learn more… | top users | synonyms

-1
votes
1answer
122 views

Transformation of a simple logic statement

I'm designing a logic circuit and I was wondering if the following two things are equivalent: (x <= y) and (x < (y + 1)) I can't think of any set of numbers that would make these two things ...
-1
votes
1answer
46 views

CompiledFunction::cfsa Argument x at position1 should be a machine-size real number [on hold]

I have a compiled function: g:=Compile[{{x, _Real}},...] and call g through an interim function: g2[x_?NumericQ] = g[x] If ...
-2
votes
4answers
566 views

Compare elements in a list

Assume that there are three different points in x-y coordinate like: p1={4, -1}; p2={5, -2}; p3={1, 5}; In order to compare these points to each other in a ...
-2
votes
1answer
243 views

How to get the coordinates of points within an image?

How can I get the coordinates of an image, and make Mathematica draw the image from the coordinates found? I am interested in just the outlines of the regions. Here is an example of the kinds of ...
-2
votes
0answers
63 views

unordered lists with maximum dispersion [on hold]

As you can implement the following I have a list $$L = {p1, p2, p3, p4, p5 ........ pn}, n <50$$ I need cluttering and print this list 4 ...
-2
votes
0answers
28 views

how to know two aircraft getting far away each other? [on hold]

Dataset: my algorithm is: calculate velocity vector each aircraft ...
-3
votes
1answer
124 views

How to make X and Y = Z? [closed]

Hello I have a big question, maybe it's extremely easy but for now I'm unable to make it work. I'm a programmer and what I need to do is for example: if X = 2 and Y = 1 then Z = 1 if X = 3 and Y = 1 ...
-3
votes
0answers
21 views

Table of an equation roots [duplicate]

I would like to form a table of all roots of an equation (say sin(x)=0) lying inside a certain interval. What kind of Mathematica expression shall I use?
-4
votes
1answer
124 views

Programming Multipolar Expansions in Spherical Tensors

We have that a density matrix can be written in a basis of spherical tensors: $\rho =\sum _{K=0}^S\sum_{q=-K}^K \rho _{\text{Kq}}^{(S)} T_{\text{Kq}}^{(S)}$ for example for a 3x3 matrix, $S=1$, ...
-7
votes
1answer
80 views

My program to model exterior ballistics doesn't doesn't produce the plot I expect

Here is my program to model exterior ballistics. It doesn't doesn't produce the plot I expect. How can I fix it? ...