« first day (1353 days earlier)      last day (1845 days later) » 

1:15 AM
@belisarius my one question on English.SE has 2.8k views and precisely 0 votes
@PatrickStevens note that you cannot get anything useful from spelunking a MathLink function added using Install, either. The internal functions are just runtime library calls so they do not have a definition that exists as source code. Of course you can decompile the RTL if it takes your fancy
1:56 AM
@OleksandrR. Liar! :)
6 hours later…
8:22 AM
@Everyone Does someone know whether ActiviationKeys will work when I install a new operating system of the same kind?
Let's say I have Ubuntu and I want to install and test Lubuntu, etc
The thing is that I filed a bug-report at WRI regarding this issue
Q: Front End does not respond to keys (version 10.2, Linux)

halirutanI was often complaining about the front end performance under Linux, but it seems I could pin down a very critical issue. I made a screen-cast that shows how to reproduce the issue Screen-cast on YouTube How to reproduce: Open a fresh Mathematica and type some code. In the screen-cast I used ...

and after two month of silence I pinged them whether they forgot me and as it turned out, the report was indeed lost under the pile.
Now, I have set up a test-machine and I would test the stuff by myself which will be hard when I have to get a new 30 Test-Licence for each OS I'm testing.
4 hours later…
12:15 PM
@halirutan @nikie and everyone else: I need to do some shortest path finding in a large binary image. Are there builtin functions for this either in Mathematica or MATLAB? Or do I have to convert to a graph first, and go from there? Maybe that's too slow so I have to do it in C?
I need the actual shortest path between two white points, but just their distance. The region of white points is not convex, thus the shortest path is not necessarily a line.
@Szabolcs Can you post an example image?
A small one
This is a small one. My real image is bigger and 3D.
@Szabolcs And you have given two points inside the white region and need their distance when you are only allowed to travel through white space?
@halirutan Yes. Ideally I also need the path, but the important part is the distance.
One way is to convert it to a Graph and use shortest path algorithms.
@Szabolcs I guess this is you way to go
Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a graph, which may represent, for example, road networks. It was conceived by computer scientist Edsger W. Dijkstra in 1956 and published three years later. The algorithm exists in many variants; Dijkstra's original variant found the shortest path between two nodes, but a more common variant fixes a single node as the "source" node and finds shortest paths from the source to all other nodes in the graph, producing a shortest path tree. For a given source node in the graph, the algorithm finds the shortest path...
12:27 PM
@halirutan Yes. The question is: is it implemented in Mathematica in any other way than for graphs? If no, I probably have to do it in C.
@Szabolcs If we have it as built-in for images/volumes, than I never used it and I'm not aware of.
12:42 PM
@Szabolcs Additionally, note that the solution of Dijkstra depends on the assumed neighbourhood of the pixel. There are extensions to the algorithm that work better, but I'm sure you find them yourself.
this imagedata with the datareversed option is so confusing :(
@Szabolcs It helps you to de-confuse your plot-related coordinate system.
@halirutan Do you know what the "indices" copied with the GUI tool represent? Indexing into ImageData? Or ImageData[, DataReversed -> True]? Or PixelValue?
@Szabolcs If you see a coordinate with "Get Coordinates" on the image, you should be able to index them when you use DataReversed->True
@Szabolcs Actually, it is pretty simple. When you look at an image like you look onto a matrix, then the row at the top should have the index 1.
With the "Get Coordinates" it has the row number nx
This last representation is more natural when you think of what you see in a plot with coordinate axes.
1:06 PM
@Szabolcs Since you are searching in Euclidean space, you can speed up Dijkstra's with minimum distance guess to make it A* search. This is very common for path finding in real time strategy games. It was my only real exposure to algorithms in high school. There are lots of existing implementations I'd guess.
@halirutan But then we have PixelValue and related functions which take the bottom left to be {0,0} and the second index refers to vertical position (not columns) ...
So it seems that the difference between PixelValue and ImageValue functions is that PixelValue uses integer coordinates that refer to pixel centres and ImageValue uses real numbers where integers would correspond to pixel corners?
@Szabolcs Never had to use those functions.
I always access pixel directly form the array.
I have my Manhattan distance path.
@Szabolcs This looks like is suffers exactly from the artefacts I mentioned (and that @MichaelHale pointed out too)
1:21 PM
@halirutan Yes, it uses Manhattan distance.
@Szabolcs Btw, this seems to be wrong.
m = {{1, 2, 3}, {4, 5, 6}};
img = Image[m]
PixelValue[img, {0, 0}]
gives 0. which is the zero padding that is done silently.
Yes, bottom left pixel is 1,1
@Szabolcs And here you see the difference when you do m[[1,1]] and PixelValue[img, {1, 1}]
@Szabolcs Ah, now I understand what you meant. Yes, thinking of pixels that have a dimension and their value in the center is really pain.
2:07 PM
@Szabolcs I think a geodesic distance transform (bwdistgeodesic in MatLab) is close to what you want, no idea how fast it is for large images.
Basically, you give it a mask and a starting point and it tells you the shortest distance to every point, without leaving the mask. If you need the path (and it's fast enough), calculate the GDT from the starting and from end point, then add them - the set of points with the minimal distance from both points is the shortest path between the two points.
hello everyone
If Mathematica gives {} after giving him a DSolve, it means there is no solution?
Q: Deleting useless responses

Jerry GuernI posted a Question this morning and promptly received responses from two users who had not understood the Question at all. I wasted some time trying to rewrite it for them, but to no avail. This has happened to me before. I realize that other users can still respond to the Question, but I als...

2:49 PM
@Szabolcs I was hoping I could get a cool true Euclidean shortest path implementation, but it required the following RegionIntersection to work.
bgRegion =
    Rectangle[# - {.5, .5}, # + {.5, .5}] & /@
     ImageValuePositions[img, 0]];
boundary = ImageValuePositions[MorphologicalPerimeter@img, 1];
RegionIntersection[Line[{boundary[[5]], boundary[[200]]}], bgRegion]
Would anyone do me a favor and check whether I made some mistake in this code DSolve[{y'[t] == 1/(1 + Abs[y[t]]) , y[4] == 2}, y[t], t]
3:08 PM
because of Mathematica says that this doesn't have a solution, but global picard lindelöf is fulfilled and I even can calculate the solution, so why can't mathematica
@DominicMichaelis What version are you using? It found a solution for me in 10.1.
@halirutan To answer my own question: Yes, it is possible to use the same ActivationKey after installing a different kind of Ubuntu on the same machine.
@MichaelHale I use mathematica student version 9.0.1
I quit the kernel and tried it again, with the same result
@DominicMichaelis Well if you are going to be doing a lot of work with those types of differential equations then perhaps the upgrade is a good idea for you. There is no guarantee though that the next type of more difficult problem you try will work even with the most recent version.
@MichaelHale in fact I just answered a question on math.stackexchange and was to lazy to solve a quadratic equation (and mathematica already run) but it really surprises me that this happens, I would be completely fine if it had just given me the input back
3:23 PM
Hello Folks need a help in understanding a problem
can some some explain the below sequence
A1 = 4: 4, 7, 19, 49 ...
4*4 = 16 = 1+6 =7
7*4 = 28 = 2+8 =10
How 19 came in the sequence
Oh that's amazing
how do i get the formula @DominicMichaelis
@chandan well for nearly every sequence there is no explicit formula, indeed such problem aren't as mathematical as one may expect, because there is totally no unique answer how a sequence goes on. Where did you stumble on that problem?
i am working on some practice problems in my company
i found this practice problem their
@Chandan I doubt I would have ever figured out what the sequence is without help, but the formula is to just put as many 9s as you can and then prepend a 1, 4, or 7 as appropriate.
3:34 PM
yep i see the same here in the help
thanks a lot...now i am step ahead of solving...have been struggling from 2 days
  Prepend[Table[9, {Quotient[3 n + 1, 9]}], 3 Mod[n, 3] + 1], {n, 0,
@MichaelHale posted my problem as a question
4:34 PM
@MichaelHale what would be the value if the A1 = 6
4:51 PM
@Chandan You mean the same problem but for 5n+1 instead of 3n+1?
yeah @MichaelHale
  Prepend[Table[9, {Quotient[5 n + 1, 9]}],
   5 n + 1 - 9 Quotient[5 n + 1, 9]], {n, 0, 20}]
in my case the A1 is dynamic
let me tweak my program
1 hour later…
6:25 PM
Gee on my question "why mathematica gives this wrong result" I got the answer "because it was programmed so"
6:49 PM
@DominicMichaelis if you feel a improvement should be made, I would suggest emailing support@wolfram.com and telling them about this issue
@chuy I am in the lucky situation that I never need to calculate the solution of a differential equation, but I found that one comment really unnecessary

« first day (1353 days earlier)      last day (1845 days later) »