« first day (586 days earlier)      last day (3888 days later) » 

1:14 AM
@Nasser Or even clearer x_Integer?Positive or x_Integer?NonNegative.
 
@Verbeia sure. good point.
 
@Mr.Wizard maybe when I get a chance. have been quite busy.
speaking of which, have to run. Bye all.
 
@rm-rf What are the relation between Fig. 1,2 and3 and how to generate it?
 
1:53 AM
if anyone like to test my latest demo, see if it is ok, here is the notebook: 12000.org/tmp/082213 if you spot any problems, something not clear, etc... thanks.
 
@hwlau See the a = DiskMatrix[... message starred on the right. I just ran it on all the images in ExampleData
Fig1 is the original images, Fig2 is at an intermediate time step and Fig3 is after a long time...
 
 
4 hours later…
6:22 AM
Actually, the DiskMatrix + GradientFilter + subtraction + normalization should be amenable to analytical alternative solution, but sadly patterns arising from that are unlikely to be particularly interesting...
 
6:50 AM
Hi - just here to try and gauge how many people here find it hard to work with Notebooks in a source control system - with all the Cells, RowBox's. Do many people here just use txt file extension?
 
 
1 hour later…
8:05 AM
@JeremyThompson My personal hunch (not based on actual educative foot-shooting) is that version control, in the sense it's used with typical source code, is unusable with Mma notebooks. Only meaningful usage scenario is to use it as a some sort of snapshotting backup service.
 
use my method of source control: v1.nb, v2.nb, v3.nb and so on
 
 
3 hours later…
11:18 AM
@JeremyThompson there are some Q&As with regard to version control around. No problem with .m packages, at any rate.
e.g.:
17
Q: Are there suitable versioning systems for Mathematica notebooks?

Fred KlineI am considering a project using Mathematica and openCL. I know that the openCL C source code can be tracked. Has anyone used a versioning site or software so multiple developers can modify a common notebook? Is it possible to: check out a notebook non-exclusively? check out a notebook exclusi...

 
12:10 PM
hey everyone
 
@Sosi Alo
 
hi @Rojo! how are you?
 
@Sosi Good. Just woke up. You?
 
hehe exactly the same
i mean, i woke up a bit ago, but have done nothing yet
where are you from?
 
@Sosi Argentina, you?
 
12:21 PM
Portugal here
 
Lisbon?
I have family there
 
...so yeah, this was not such a useful morning (it's already 1pm)
I'm from very close to lisbon!
have you ever visited them?
 
Sim, duas vezes acho. Mas a primeira era muito pequeno. A ultima vez foi já ha7 anos mais ou menos
 
wow!! Muito bem!! :D
ahahah
 
:)
 
12:25 PM
Yo tanbien hablo un poqito de espanol, pero no se escribir :P
 
Jaja, muy bien también
 
12:48 PM
@Rojo other than Alt + ., or Alt + ,, is there a more direct way of just quitting the kernel by force?
 
@Sosi Those alts don't quit th ekernel, they just try to interrupt the evaluation
To force quit the kernel, go to the Evaluation menu->Quit kernel
or check this question
15
A: Do you really want to quit the kernel? Yes!

Chris DegnenYou can add this to your init file, (or just try it out for the current session). It will add a Quit to your key events. This Quit doesn't open a confirm dialog. FrontEndExecute[ FrontEnd`AddMenuCommands["MenuListQuitEvaluators", {MenuItem["AddMenu &Quit", FrontEnd`KernelExecute[ToExpre...

 
@Rojo yep, that was exactly it. I was having the same problem as the OP
btw, do you know where can I find MenuSetup.tr? the only one that I find in the Mma installation folder is SystemMenuSetup.ml
 
Perhaps in `FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd",
"TextResources", $OperatingSystem}]`
 
1:06 PM
@Rojo thanks, it was there
 
No problem
 
 
3 hours later…
3:50 PM
Does anyone have any idea how can I find the central point in a ContourPlot? (Imagining the contour defines a circle, I would be looking for the centre)
 
4:06 PM
@Sosi This is not obvious for non-convex regions.
Even then you need to define what you mean by "central point".
 
@halirutan I wonder if this is just a stupid question, given that I have no obvious mathematic way of defining it
 
@Sosi Almost no question is stupid, but you need to consider that the general case is not so easy to answer.
 
@halirutan yeah.. :\
 
@Sosi Take for instance this here
ContourPlot[Cos[x] + Cos[y], {x, 0, 4 Pi}, {y, 0, 4 Pi}, Contours -> 1]
which center do you want here?
 
@halirutan in my own problem I don't have multiple regions, just a single one (I used Cos in my example just because I couldn't come up with anything else)
but I recon that this is probably very hard to answer without explicit code
 
4:16 PM
@Sosi Then what you can try easily is the center of masses if you view your region as solid object
 
@halirutan googling! Thanks!
I get the idea
 
@Sosi Taking your example:
data = Table[ Boole[Sin[x] + Sin[y] < 0], {y, -4.7, 1.6, 0.05}, {x, -4.7, 1.6, 0.05}];
Image[data]
Mean[Position[data, 1]] // N
This gives you the center of masses in pixel coordinates.
 
What would you do if your function was an InterpolatingFunction and you didn't know the algebraic expression?
 
@Sosi The same.
 
@halirutan (also, could you post that as answer? )
Oh, just with Mean? Is that so simple?
wow
hm
 
4:23 PM
@Sosi What I would do is taking the image and use ComponentMeasurements
@Sosi So if you have data as above then
img = Image[data];
ComponentMeasurements[MorphologicalComponents[img], "Centroid"]
 
@halirutan Oh nice! I see!
 
The two other objects are the small points to the left and at the bottom which are recognised as separate objects.
 
wow this is cool
yeah
 
@Sosi The good thing here is that you have all the fancy measurements which are provided
      	"Centroid"	center of mass coordinates
      	"Medoid"	coordinate of the closest element to the centroid
      	"MeanCentroidDistance"	mean distance of all elements from the centroid
      	"MaxCentroidDistance"	maximum distance of all elements from the centroid
      	"MinCentroidDistance"	minimum distance of all elements from the centroid
And the other 3 millions
 
oh my...
eheh this is cool!
I didn't know about ComponentMeasurements, but I was suspecting something like it could show up :P
Can you post this code you just gave me as answer to my question? This way I'll give you credit and you get some points!
please
 
4:33 PM
@Sosi Or you integrate like the formula for a continuos objects suggest
ip = ListInterpolation[data];
1/NIntegrate[ip[x, y], {x, 1, 127}, {y, 1, 127}, MaxRecursion -> 0]*
 NIntegrate[ip[x, y]*{x, y}, {x, 1, 127}, {y, 1, 127}, MaxRecursion -> 0]
this is the formula from Wiki
 
@halirutan thank you so much!
 
@Sosi And yes, you could extract the polygonized region from a ConourPlot too and calculated the center on basis of the polygons, but if you have a function anyway, I would stick to that.
Lets wait what the other users suggest as answer ;-)
Going to dinner, see you all later!
 
@halirutan have a nice one! Oh, and someone suggested something similar to what you said above
 
@Sosi Yes, Simons suggestion is also possible. You see, there are many ways. Maybe I fill in some alternatives later.
 
@halirutan thank you so much for all the help!
@halirutan enjoy your dinner
 
 
4 hours later…
8:57 PM
Interesting news for v9 users re: MapAt, assuming this isn't already disseminated:
 
 
1 hour later…
10:00 PM
@YvesKlett I asked SE and they said that the process is the same as before... so please post a meta question inviting applications and feel free to list yourself as a volunteer in the answers :)
 
 
1 hour later…
11:02 PM
@Mr.Wizard GREEEEEEEEEEAT
Yeah, I pinged you just to celebrate
Sorry
 
11:26 PM
@Rojo lol -- that's OK.
Okay, out again. Bye!
 

« first day (586 days earlier)      last day (3888 days later) »