Question 1: I am trying to make a list of all ordered pairs (x,y) with x,y<6 and then output only ones with certain attributes, e.g. I would like to output only the (x, y) s.t. x>y or y>3, etc.. Here is what I came up with to list them:
Now I just need to filter them so that I end up with a nice list of the ones I am wanting. I've scoured the Mathematica help file but I just can't seem to get it to work. I've tried With[] and Cases[] and this is the closest I've gotten:Code:Tuples[Table[x, {x, 6}], 2]
Also, is there a way to display the pairs with parentheses instead of brackets in the output?Code:Cases[Tuples[Table[x, {x, 6}], 2], {x_, y_} -> x > y]
Question 2: I am trying to change the default mathematica settings for notebooks, particularly some of the printing settings. So far I have made a copy of the default.nb found in 'Mathematica.app/SystemFiles/FrontEnd/StyleSheets' and named the copy MySettings.nb. Then I have changed the settings for this notebook by opening the notebook and selecting 'File>Printing Settings>Headers and Footers...' and unselecting 'Left and Right Pages'. I also select 'No header on first page'. Then I select File>Install... and select Stylesheet and select the file MySettings.nb. After this, I opened the Options Inspector and changed the DefaultStyleDefinitions path under Global Options to be '~/Library/Mathematica/SystemFiles/FrontEnd/StyleSheets/MySettings.nb'.
This seemed to work for the 'Left and Right Pages' setting, however, every new notebook I make has the 'No header on first page' box unselected.
My first question about this is whether or not this is the best method in general for changing default settings? It seems pretty cumbersome and I would think there would be an easier way to change the default settings for notebooks and still allow one to revert back to the original settings if you changed something that shouldn't be changed.
My second question is how do I get the settings to reflect what I am wanting, i.e. how do I get the 'No header on the first page' selection to stick?
Thanks in advance. Hopefully one day I'll be able to return the favor and be answering questions on this forum instead of asking them all the time![]()


LinkBack URL
About LinkBacks
