The town I live in gets about 7-8 months of heavy snow a year. The population of the town is quite small too (~7000) people. So the town goes about clearing snow off the roads in a generally inefficient manner. I was planning on suggesting, as an exercise, at the next town hall meeting that we should look at a PERT/CPM (network chart) approach for clearing snow. Has anyone done something like that with mathematica?
Let's say 7-8 months of snowing on level that demands clearing the roads regularly is pretty hard to find in Finland (but at the same time, Southern Finland is probably the warmest place at its' latitude - and not awfully rainy (compare with those places that get several meters of snow regularly).
I've been observing the problem that's common in Finland: sand dunes on highways. Just that those dunes are snow in Finland, and I eyed dunes in Oman...
I cannot understand why the following loops -- for-loop and Table -- work totally differently.
I try to do the totally same thing, I only rewrote the looping below with Table but I am getting totally different output -- why?
@kirma kuinka kokenut Mathematican käyttäjä olet? Hieman jumisa yhdessä ongelmassa ja asun itsekin Espoossa, voisin tarjota kyl kahvit ja mul on auto käytössä, aikaa?
(just asked in Finnish whether Kirma around, he looks to live closeby and stucked to very simple Mathematica thing that I have already done in Matlab and now trying in Mathematica: now bug with the odd looping)
What is the difference between the following things For[ii=1,ii<100,ii++,Hello[ii]] and Table[Hello[ii],{ii,1,99}]?
Moved a question here about the For-looping and Table-looping.
If it is just a single Null outside of a list that is returned, nothing is shown, which is what happens in the For.
It is returning Null, but it is printing results before it returns Null. If you passed that For into another function it would only get Null. It would not see the numbers that were printed.
Table[Print@i; i, {i, 10}]
That prints them as it does each iteration and returns the list of results.
Monitor might be more appropriate for what you want though.
I always forget simple things: "What was the way to select Nth column?"
Not working for the 1st col, A = IdentityMatrix[10]; A[[: , 1]], I have done this many times earlier but cannot find how -- I am able to select rows but not certain columns.
@MichaelE2 Thanks! Actually just Plot's BaseStyle will override Graphic's BaseStyle, and I also want to change all other fonts, including axes labels, frame labels, frame ticks, any Text[] primitives, etc. It's possible to do it by adding the appropriate styles to each plotting functions, but I was hoping for a simple one-time solution.
But it's not a big deal.
Does anyone know what method options are available for FindRoot for multivariate numerical blackbox functions, and what is the default for this case?
@PlatoManiac Yes, I found the same solution rm posted in a comment, and though the question too simple ... It's not an ideal solution, and it doesn't give me very nice plots, but it's quick and it's good enough for now.
@PlatoManiac Do you need me to undelete it so you can post an answer?
@Szabolcs Cell[StyleData["Graphics"], FontFamily->"Helvetica", FontSize->16, FontWeight->"Plain", FontColor->RGBColor[1,0,0]] will style all your `Graphics` head output, including `Plot`
Note that inseting BaseStyle in GraphicsBoxOptions doesn't work. I think this is because the Core style has fonts specified and must override. ...and using stylesheets to customize your notebook appearance is a more conventional way of doing it
@MikeHoneychurch I tried it and it's impossible to insert BaseStyle there. Your suggestion is very useful, it also affects graphics Exported from that notebook. Maybe it would be useful to make a question/answer out of it
You can type GraphicsBoxOptions->{BaseStyle->Directive[FontFamily->"Helvetica"]} but like i said because the font type is explicitly specified in the parent style in core.nb I think this is taking precedence. Stylesheets are very useful :)
@MikeHoneychurch Would you like to post that answer? I would have a make a note of this anyway, so I'll have it handy in the future. I might as well do it here on M.SE.
i thought i might explain a bit about why SetOptions wasn;t working for you. it is certainly not obvious why it isn;t working. ...actually maybe you could make that part of the question
@Szabolcs It will work if you give it the right polygon... this is what I was trying to do above. I think the crossings can be avoided by coding up a custom distance function
It's all about the ordering... I have the set of points for the polygon, but the ordering is a little messy.