Message Boards Message Boards

Mathematica beyond mathematics

12 Replies
Posted 4 years ago

Guillermo, Rohit,

Thanks for both your replies. I am discovering there are usually quite a few ways to achieve something in Mathematica!

Regards,

Paul

POSTED BY: Updating Name

This option is explained later in the book, for this reason I avoid to use a function until the concept it has not been explained.

In any case supplementary material and corrections (very few it has been necesary) are available at
http://Mathematicabeyondmathematics.com

Thanks

Posted 4 years ago

Or apply the rule to the right level.

Replace[list, {a_, b_, c_} -> a/(b + c), 2]
POSTED BY: Rohit Namjoshi

Thank you Paul

I have clarified this problem in the book web site: http://Mathematicabeyondmathematics.com

The rule works fine except if the list has exactly the same size that the number of sublist, three in this case. You can test with a list with more than 3 sublist.*) type list={{a1, b1, c1}, {a2, b2, c2}, {a3, b3, c3}, {a4, b4, c4}};

To avoid this type of problems I suggest in the book use pure functions: e.g. (#1/(#2 + #3)) & @@@ list

But your proposal it is a good option

Posted 4 years ago

Hi José,

Just to say, I'm thoroughly enjoying your book.

One thing confused me though: on pages 78 and 79, you define a list

list = {{a1, b1, c1}, {a2, b2, c2}, {a3, b3, c3}}

and then use replacement list /. {a, b, c_} -> a/(b + c) But this produces

{a1/(a2 + a3), b1/(b2 + b3), c1/(c2 + c3)}

Not

{a1/(b1 + c1), a2/(b2 + c2), a3/(b3 + c3)}

as suggested should be the answer.

From my limited knowledge, I think it is because it sees a, b and c being the three lists inside rather than the elements of each list.

Am I on the right track?

Also, from a bit of research, I think this would cure the problem:

list /. {a_Symbol, b_Symbol, c_Symbol} -> a/(b + c)

Thank you for your time.

Paul

POSTED BY: Paul Horth

In fairness, it should be noted that in his presentations, Stephen Wolfram often emphasizes using Mathematica in various areas outside of mathematics proper; indeed, he sometimes almost grudgingly shows new mathematical features. See, e.g.: https://www.twitch.tv/stephen_wolfram

POSTED BY: Murray Eisenberg
Posted 7 years ago

Which recent versions of Mathematica are covered by the book?

POSTED BY: Eric L

Math 11.0.1 (tested with 11.1)

Guillermo

Mathematica beyond mathematics. Tested with Math 11.1 and 11.2: Supplementary materials: http://diarium.usal.es/guillermo/mathematica/

Looks like a great book.

About (iii), I see from the table of contents that this is a big book. To learn Wolfram Language, you are probably not suggesting to read the whole book, but it is enough to do chapters 1-3 (and maybe skip part of 3). One doesn't need to learn 6000 functions. I am wondering how many functions do you think someone needs to learn?

Out of curiosity, are you planning to make a Spanish version?

POSTED BY: Todd Rowland
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract