2014年12月15日 # Mathematica Tips 2

@MathematicaTip のツイートをまとめました。数式処理プログラム Mathematica を使う人にとって便利な Tips が満載！ 過去のツイートはこちら http://togetter.com/li/150700 続きを読む
1

Plot a vector field over a surface: data = Table[{y, -x, z}, {z, -3, 3}, {y, -2, 2}, {x, -2, 2}]; ListSliceVectorPlot3D[data,"CenterPlanes"]

Random ball collections: Graphics3D[ Table[{Hue[RandomReal[]], Ball[RandomReal[1, {3}], RandomReal[0.1]]}, {200}]]

The permanent of a square matrix of all ones is the factorial of the dimension: Table[Permanent[ConstantArray[1, {n, n}]], {n, 10}]

Generate a set of pseudorandom matrices with GaussianSymplecticMatrixDistribution: RandomVariate[GaussianSymplecticMatrixDistribution]

Bandpass filtering of vector: data=Table[Sin[i^2+i]+RandomReal[{-.2,.3}], {i,0,Pi,0.01}];ListLinePlot/@{data,BandpassFilter[data,{.01,.02}]}

Show the current locale time zone setting: \$TimeZoneEntity

Display the grammatical structure of a sentence: TextStructure["The cat sat on the mat."]

Get total mass of 10 hydrogen atoms: EntityValue[EntityCopies[Entity["Element", "Hydrogen"], 10], EntityProperty["Element", "AtomicMass"]]

Partition into blocks that are up to 3 elements long; the last block is shorter: Partition[Range, UpTo]

Open a connection to a server at a specified socket address: bit.ly/1m8HyER

Sample from matrix distribution: sigR = {{3, 1}, {1, 4}}; sigC = {{1, -1/2}, {-1/2, 2}}; RandomVariate[MatrixTDistribution[sigR, sigC, 3]]

Generate a Cornu spiral: DSolve[{x'[s] == Cos[t[s]], y'[s] == Sin[t[s]], t'[s] == s, x == 0, y == 0, t == 0}, {x, y, t}, s]

With IncludeInflections->True, inflected forms will be included in results: MemberQ[WordList[IncludeInflections -> True], "zooming"]

Find a sample of 5 "Volcano" entities: RandomEntity["Volcano", 5]

Search for articles by title: WikipediaSearch["Artificial intelligence", "MaxItems" -> 2]

Shortest path (geodesic) between two locations: GeoGraphics[GeoPath[{{-35, -55}, {70, 100}}], GeoRange -> "World", Frame -> True]

Give the total atomic mass of all chemical elements: EntityValue[EntityGroup[ElementData[]], "AtomicMass"]

Print the result of an intermediate computation: expr1; Echo[x = 1 + 1]; expr2

Look up the IP addresses associated with a host: HostLookup["localhost"]

Single pseudorandom matrix w/ nonzero mean: RandomVariate[MatrixTDistribution[{{1,2,3}, {4,5,6}}, {{1,1/3}, {1/3,1}}, IdentityMatrix, 2]]

Get a "pure function" solution for y: DSolve[{y'[x] + y[x] == a Sin[x], y == 0}, y, x]

Compare offset btw Eastern Time & London Time on different dates: TimeZoneOffset["America/New_York","Europe/London",DateObject[{2015,3,7}]]

Get a sorted list of 2000 random words: AlphabeticSort[RandomSample[WordList[Language -> "Russian"], 2000], "Russian"]

Compute detailed properties of the standard ocean model with StandardOceanData: bit.ly/1iS0RQw

### コメント an_shida @an_shida
この世界の片隅に関連のtweetが混入しているような。毎回更新でお知らせ来るんだけど門外漢でさっぱりわからない。 