Tag Info

Hot answers tagged

19

Mathematica is the best tutorial. It is a discovery tool - just start from something that he knows a bit already and you both take one little step at a time. Just try things. 1st Thing - Try this Link => Hands-on Start to Mathematica I personally would recommend engaging with him in a project of making an application and submitting it to the Wolfram ...


16

A combination of StringJoin and Riffle: res = StringSplit["a b c d e f g"," "]; StringJoin@Riffle[res," "]


14

Affirming Vitaliy's suggestions I'll say something beyond his comprehensive answer and to a certain extent more specific. A great mathematician S.Banach used to say (maybe as a joke) that children shouldn't be taught mathematics early because that would be a too sharp tool for them. There is an obvious analogy and this is why children shoudn't be taught ...


13

Vitaliy's suggestion is indeed very good. What I want to add is that the Documentation is a good place to start. Say he's interested in drawing some graphs to illustrate something, then the Guide page for Graphs is a great place to start and the reference pages have tons of examples to build from. Once one has solved a problem or two with Mathematica ...


11

One unconventional but possibly very useful approach it to introduce him to Project Euler. While many of the newer questions are completely beyond me (mind you that is not saying much), many of the earlier ones are quite approachable. If your friend has the desire to learn and an interest in puzzles/challenges, this site will grow as he grows. Most of the ...


8

In version 10.1 you can use StringRiffle: res = StringSplit["a b c d e f g", " "]; StringRiffle[res] Use no second argument for spaces, or something else for something else. A nice advantage of StringRiffle is that res elements can be non string elements, and it will be automatically converted. It's something I miss in StringJoin. PS: this answer is ...


8

I started learning Mathematica a couple of months ago, and all these suggestions are good. I'd also say that, although it's possible to surround yourself with books and tutorials, it's even more important to have some focus or goal to give shape to your learning efforts. You can find yourself bouncing from one interesting corner to the next (particularly ...


7

I know this is an old thread now, but this might prove useful to someone. I have been teaching Mathematica to high school students for almost a year now. I have had to make my own resources, as I couldn't find any that were fit to purpose. I am happy to share them, and here is the Dropbox link: Mathematica Exercises All mistakes are my own! I am also happy ...


7

University of Southern Maine has some Mathematica based courses: Engineering Tools: Mathematica (notebooks) Circuits I: Steady-State Analysis (notebooks) Digital Signal Processing (notebooks) Digital Image Processing (notebooks)


6

To shuffle a list simply apply RandomSample: RandomSample @ Range[9] {3, 7, 1, 8, 4, 9, 6, 2, 5} See Shuffling a list in Mathematica for other ideas.


6

A pioneering web site in this respect is the one by James Kelly, who unfortunately passed away in 2007 as the linked web page states. His lecture notes are very high quality and all written as notebooks.


6

This page could be quite interesting in your case http://education.wolfram.com/algebra/ The animations here explain some common Mathematica functions in a quite funny way. http://reference.wolfram.com/legacy/flash/ There's a huge list of other resources here where you could pick what you think suits you. Where can I find examples of good Mathematica ...


5

Use ParametricPlot Clear[x, y, t]; r = 0.5; a = 1; c = 0.01; e = 0.1; k = 500; d = 0.1; sol = NDSolve[{x'[t] == r x[t] (1 - x[t]/k) - a c x[t] y[t], y'[t] == a c x[t] y[t] - d y[t], x[0] == 30, y[0] == 30}, {x, y}, {t,1000}]; ParametricPlot[Evaluate[{y[t], x[t]} /. sol], {t, 0, 1000}, Frame -> True, ImagePadding -> 40, ImageSize -> ...


4

There's a second year mathematics and a computation physics course taught by Paul Abbott at the University of Western Australia that uses Mathematica for all of the lectures, workshops and assessments. The maths course uses a customised stylesheet and the assessment notebooks have automated FTP uploading to the assignment dropbox. However, most of the ...


4

There's such a good video explaining how mathematica functions work using cool animation, i insist on watching this, it will seriously help you https://www.youtube.com/watch?v=_0Y42ExmBoY


4

Let me give a model solution which can easily be adapted. 2 dimensions Consider a photon which moves in the x-y-plane, starting at time t = 0 in the origin {0,0} and moving towards the positive x-axis. At each tick of the clock, corresponding to a constant distance 1 travelled by the photon, the photon will experience a scattering event which leads to a ...


4

My interpretation is: the photon will be scattered by an angle $\alpha$ (given by getScatterAngle), and the deviation will occur with equal probability in every direction. (For example, a photon initially going along the $z$ axis will be rotated by an angle $\alpha$ about a randomly chosen axis that lies in the $x,y$ plane.) When I've written Monte Carlo ...


3

Sometimes you can you this alternative: res = StringSplit["a b c d e f g", " "]; ToString @ Row[res, " "]


3

how I can get a completely unordered list lst = {"DSC00025.JPG", "DSC00026.JPG", "DSC00027.JPG", "DSC00028.JPG", "DSC00029.JPG", "DSCI6714.JPG", "DSCI6715.JPG", "DSCI6716.JPG", "DSCI6717.JPG", "DSCI6718.JPG", "DSCI6719.JPG", "DSCI6720.JPG", "DSCI6721.JPG", "DSCI6722.JPG", "DSCI6723.JPG", "DSCI6724.JPG", ...


3

Framed[ Column[ {Text[Style["1/3+1/6 =", Italic, 14]], RadioButtonBar[Null, {"a) 3/2", "b) 1/2", "c) 2/3", "d) 7/9", "e) 11/4" }]} ] ] Or a longer version: Framed[ Column[ {Text[Style["1) 1/3+1/6 =", Italic, 14]], RadioButtonBar[ Null, {"a) 3/2", "b) 1/2", "c) 2/3", "d) 7/9", "e) 11/4"}], Text[Style["2) ...


3

A simple brute-force solution for the interpretation of this problem given in the comment by rasher: fun := Abs@Flatten@ Differences[{{#1, #2}, {#1, #3}, {#2, #3}, {#2, #4}, {#2, #6},{#2, #5}, {#3, #4}, {#3, #6}, {#3, #7}, {#6, #5}, {#6, #7}, {#4, #6}} /. {{4, 5} -> {0, 2}, {5, 4} -> {0, 2}}, {0, 1}] & Select[Permutations[Range@7], ...


3

To help you get started, here is a simple demonstration with Spectrogram. First I need a list of note names and frequencies: notes = Thread[{440.0*2^(Range[0, 12]/12), {"A", "A#", "B", "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A"}}]; Now I choose a sample rate and generate a set of samples corresponding to playing each note in turn for ...


2

First, an auxiliary function that mimics what your division example, i.e. multiplies the dividend by 10 whenever it is smaller than the divisor, and returns only the remainder. columnDivRem[a_, b_] /; a < b := QuotientRemainder[10 a, b][[2]] columnDivRem[a_, b_] := QuotientRemainder[a, b][[2]] Then the "main" function, without If's or Do's, that ...


2

A good source are the Wolfram.com pages; http://mathworld.wolfram.com/search/?query=stochastic+models&x=17&y=14 http://search.wolfram.com/?query=stochastic+models&x=0&y=0 Not free, but gives you a good overview for the library; ...


2

Try this Format[primeFactorForm[n_Integer]] := Times @@ Superscript @@@ FactorInteger[n] /. _[x_] :> x; block[n_Integer] := Join @@@ Array[{#, primeFactorForm@#} &[# + 100*#2] &, {100, 10}, {1 + (n - 1) 1000, 0}]; grid[m_?MatrixQ] := With[{th = AbsoluteThickness[1]}, Grid[m, Dividers -> ({#, #} &@{th, {True}, th})]]; ...


2

Using the 'Notation' package, you can create real symbols from (not only!) subscripted variables: Needs["Notation`"] makesymbol[obj_]:=With[{}, If[NameQ@ToString@Unevaluated@obj,Remove@obj]; (* remove possibly existing symbol first *) Symbolize@ParsedBoxWrapper@ToBoxes@obj;] (* then create the new symbol *) With this function, you can ...


1

I know, I know, Kuba's and Pickett's solutions are preferable. For those who fancy Patterns here is an alternative. StringReplace[res, t : __ :> t <> " "] // StringJoin // #~StringDrop~ -1 & Doesn't look elegant, anyhow.....it works...hi,hi,hi.!


1

Just for fun, I have just used brute force but not as elegantly as Karsten 7 and I am too time poor to cull labeling that are just reflections etc. The graph layout just for visualization out of laziness but isomorphic to graph. g = {1 <-> 2, 1 <-> 3, 2 <-> 3, 4 <-> 2, 4 <-> 3, 2 <-> 5, 5 <-> 6, 4 <-> 6, 6 ...


1

Format[x[i_, j_]] := Subscript[x, StringJoin[ToString /@ {i, j}]] t = Total[{x[1, 0], x[1, 1], x[0, 1]}] Solve[t == 1, x[0, 1]]


1

You should assign something to a, before exporting it. Try this ... primeFactorForm[n_Integer] := Times @@ Superscript @@@ FactorInteger[n] /. _[x_] :> x; block[n_Integer] := Join @@@ Array[{#, primeFactorForm@#} &[# + 100*#2] &, {100, 10}, {1 + (n - 1) 1000, 0}]; grid[m_?MatrixQ] := With[{th = AbsoluteThickness[1]}, Grid[m, ...



Only top voted, non community-wiki answers of a minimum length are eligible