MuPAD
We have loosely tossed about the term “domain”. We shall now look at this in a bit (but not much) more detail. Domains are fundamental to the way in which MuPAD works, and we need to have a basic understanding of them in order to use MuPAD effectively.
A domain in MuPAD is either an algebraic structure (such as finite field or permutation group) or a data type (such as Matrix, Polynomial or Fraction), for which overloaded operators or functions defined on that domain always return results in the domain (or the result FAIL if no result exists).
To give some examples, suppose we investigate matrices over the integers modulo 29. Since 29 is prime, these integers form a Galois field, and so the matrices should respond to all standard arithmetic operations.
First the definition:
>> M29:=Dom::Matrix(Dom::IntegerMod(29));
Dom::Matrix(Dom::IntegerMod(29))
We have two domains being used here: Dom::Matrix, which creates a matrix domain, and Dom::IntegerMod(29), which creates the field of integers modulo 29.
>> A:=M29([[100,200,-30],[47,-97,130],[13,33,-1001]]);
+- -+
| 13 mod 29, 26 mod 29, 28 mod 29 |
| |
| 18 mod 29, 19 mod 29, 14 mod 29 |
| |
| 13 mod 29, 4 mod 29, 14 mod 29 |
+- -+
Notice that the result returned by MuPAD is automatically
normalized so that the matrix elements are in the required field.
If we enter values which can't be normalized (say, decimal
fractions), MuPAD will return an error message.
>> 1/A;
+- -+
| 3 mod 29, 8 mod 29, 15 mod 29 |
| |
| 28 mod 29, 9 mod 29, 22 mod 29 |
| |
| 12 mod 29, 19 mod 29, 13 mod 29 |
+- -+
Here the inverse operator returns a suitable result. Let's check
this.
>> %*A;
+- -+
| 1 mod 29, 0 mod 29, 0 mod 29 |
| |
| 0 mod 29, 1 mod 29, 0 mod 29 |
| |
| 0 mod 29, 0 mod 29, 1 mod 29 |
+- -+
This is the identity for our particular matrix ring. Now we can try
a few other matrix operations.
>> linalg::det(A);
12 mod 29
>> linalg::gaussElim(A);
+- -+
| 13 mod 29, 26 mod 29, 28 mod 29 |
| |
| 0 mod 29, 12 mod 29, 2 mod 29 |
| |
| 0 mod 29, 0 mod 29, 9 mod 29 |
+- -+
>> linalg::gaussJordan(A);
+- -+
| 1 mod 29, 0 mod 29, 0 mod 29 |
| |
| 0 mod 29, 1 mod 29, 0 mod 29 |
| |
| 0 mod 29, 0 mod 29, 1 mod 29 |
+- -+
>> A^10;
+- -+
| 22 mod 29, 10 mod 29, 3 mod 29 |
| |
| 3 mod 29, 21 mod 29, 16 mod 29 |
| |
| 4 mod 29, 18 mod 29, 5 mod 29 |
+- -+
>> exp(A);
FAIL
The matrix exponential exp(X) is defined as 1 + X + (X^2)/2 +
(X^3)/6 + (X^4)/24 + . . . + (X^n)/n! + . . . As you might expect,
this is not defined for matrices over our field. For another
example, consider polynomials over the integers modulo 2. The
definition is similar to the matrix definition above.
>> PK:=Dom::Polynomial(Dom::IntegerMod(2));
Dom::Polynomial(Dom::IntegerMod(2))
Now we'll create a polynomial in this domain.
>> p1:=PK(x^17+1);
17
x + 1
For good measure, we'll create a second polynomial which looks the
same, but is not in our domain.
>> p2:=x^17+1;
17
x + 1
Even though they look the same on the screen, MuPAD knows all about
them; the type command will tell us.
>> type(p1);
Dom::Polynomial(Dom::IntegerMod(2))
>> type(p2);
"_plus"
(The result of this last command is that p2 is
an object formed by adding things together.)
>> Factor(p1);
3 4 5 8 2 4 6 7 8
1 (x + 1) (x + x + x + x + 1) (x + x + x + x + x + x + 1)
>> Factor(p2);
2 3 4 5 6 7 8 9 10 11 12 13
(x + 1) (x - x - x + x - x + x - x + x - x + x - x + x - x
14 15 16
+ x - x + x + 1)
The domains package is part of MuPAD which is
very much in a state of constant revision and enhancement. For
example, at present, it is not possible to perform polynomial
division in a polynomial domain.
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- RSS Feeds
- New Products
- Using Salt Stack and Vagrant for Drupal Development
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- Validate an E-Mail Address with PHP, the Right Way
- New Products
- Tech Tip: Really Simple HTTP Server with Python
- Ahh, the Koolaid.
4 hours 1 min ago - git-annex assistant
10 hours 45 sec ago - direct cable connection
10 hours 23 min ago - Agreed on AirDroid. With my
10 hours 33 min ago - I just learned this
10 hours 37 min ago - enterprise
11 hours 7 min ago - not living upto the mobile revolution
13 hours 59 min ago - Deceptive Advertising and
14 hours 34 min ago - Let\'s declare that you have
14 hours 35 min ago - Alterations in Contest Due
14 hours 36 min ago
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.




Comments
Sellout
Mupad has been bought out by mathworks and all code is now under matlab (junk) licence.
any and all open source work is now dead.
Thankyou for a well written a
Thankyou for a well written article. TeXmacs acts as an excellent interface to mupad. I assume that the TeXmacs screen display generated by TeX. The graphics is generated by javaview. The combination of TeXmacs and javaview greatly enhance the mupad experience.