Using the Correct Product with MATLAB for Dummies

A reader recently wrote in with a problem with the example on pages 311 and 312 of MATLAB for Dummies. In this case, the reader was using the R2015b academic license edition. What the reader saw was this error:

>> A = magic(4)

A =

    16     2     3    13
    5    11    10     8
    9     7     6    12
    4    14    15     1

>> factor(sym(A))
Error using sym/factor (line 50)
The first argument must be a scalar.

It turns out that the newer version of MATLAB doesn’t provide the same support as the R2013b release used for the book. As a result, the example code doesn’t work as expected because the newer version requires different code that looks like this:

A=magic(4)
for i=1:4
    for j=1:4
        B{i,j}=factor(A(i,j));
    end
end

To get all factors double click on B in the workspace window. This workaround is needed because the newer version no longer supports the old method of performing the task.

The point is that the book is written to use a specific version of MATLAB, R2013b, so you must have that version in order to get good results. Fortunately, you can still get the R2013b release. All you need to do is go to the Mathworks site at: http://www.mathworks.com/downloads/select_release. Simply choose the R2013b release from the Download Earlier Release list after you have logged in. Please let me know if you have any questions or concerns at John@JohnMuellerBooks.com.

 

Considering the Effects of Automation

After recently watching Disney’s new movie, Tomorrowland, I started thinking about the world that really could come about tomorrow. Of course, it will have many of the same problems we have today, but I’m sure it will also have a few new problems and hopefully, some of the old problems will see some sort of resolution. My recent forays into advanced math have given me a new perspective of just what it will take to create tomorrow. In writing both Python for Data Science for Dummies and MATLAB for Dummies I’ve come to a greater appreciation of the role that both math and science will play in creating this new world—not that there was any lack of appreciation before I wrote the books, but the vision now is clearer.

The fact of the matter is that people will require more education. Even plumbers and electricians will need to know more in order to deal with new technologies coming on the scene (think about performing tasks such as installing solar panels). It will come to a point where advanced schooling after high school (whether trade or technical) is going to become a necessity. Yes, people can still get jobs today without a college education, but those days are coming to an end with the advances in robotics I keep reading about. For example, a recent New York Times article, As Robots Grow Smarter, American Workers Struggle to Keep Up, says quite a lot about the future of low paying jobs—they simply won’t exist. Articles such as the one found in MIT Technology Review, Robots That Learn Through Repetition, Not Programming, tell the story of why this is the case. In the future, robots will learn to perform new tasks as needed. The tone of some of these articles is a bit negative because we’re viewing the future through today’s eyes.

What I see in the future are opportunities for people to create, but in a safer environment than in the past. Just as it’s difficult to see the past as it actually was (the way the people viewed things at that time), trying to view the future, even if you have some inkling of what that future might contain, is difficult. For example, imagine having to saddle your horse before you can go anywhere—people today are used to simply climbing into the car and turning the key. However, if you lived in the early 1900s, a car was a really loud, obnoxious device that would spell the ruination of society—horses were far more practical and comfortable (interestingly enough, about 40 percent of those cars were steam powered). There is a difference in viewpoint that is hard to overcome (or even imagine for that matter). A ComputerWorld article, How enterprises can use artificial intelligence, describes how technology in the movies doesn’t quite match reality. In fact, you might find some of the ways in which advanced technologies and automation are used somewhat boring. Fraud detection hardly ranks as a highly exciting way to use technology, but it reflects the practical nature of how technology sees use today.

When I see kids today doing absolutely everything on a smartphone, I come to realize that they already live in a world far different from the one I knew as a child. There is no going back. Children today have different problems than I had simply because the technology is different. If I encountered a problem, I first had to find a phone to call someone for help—children today carry their phone with them (almost as another body part). Then again, children when I grew up didn’t have the problems with obesity that children do today.

A lot of the readers I talk with every day express various feelings about automation and all it entails—some are scared, others elated. The fact is that the future has always been different. Change is a part of the human condition. We’ll live through the changes that automation will create too. Let me know your thoughts on the changes that automation will bring at John@JohnMuellerBooks.com.

 

MathWorks Promotes MATLAB for Dummies

I was incredibly pleased to receive an e-mail the other day stating that MathWorks, the makers of MATLAB, had placed a link for MATLAB for Dummies on their site. I’m always thrilled to receive that sort of recognition and I really appreciate the vendor doing it for me. MathWorks was especially helpful during the writing of the book and I thank everyone involved for their support.

Products such as MATLAB are becoming ever more important as people ask for consumer products with more and more capability, and also want smart devices with which to interact. Of course, MATLAB is used for all sorts of technical, scientific, and medical work. However, the place where most people are likely to see the effect of MATLAB is in the improved devices offered at the store, as part of appliances, and within vehicles.

I also see MATLAB as an important tool to help continue the fight to provide better accessibility aids. At some point in everyone’s life, accessibility aids become essential. If nothing else, getting older means having to use accessibility aids to continue being independent. The sooner we come up with truly effective accessibility aids, the better for everyone.

No matter how you use MATLAB, it’s a great tool for performing a wide range of tasks that require heavy duty math. Yes, you could possibly use it for simple math tasks too, but what would be the fun of that. Thanks again to the MathWorks folks for their support of my book. I really do appreciate it!

 

Table 3-1 in MATLAB for Dummies

A reader wrote a short while ago about a potential error in Table 3-1 on page 51 of MATLAB for Dummies. Errors do creep into books during the writing process and, despite my best efforts, no one spots them until after the book appears in print. In fact, I cover this very issue in Errors in Writing. If you ever find an error in your copy of a book, I’ll do my best to verify it and then post my findings there. The updated Table 3-1 should look like this:

Table 3-1: Relational Operators

Meaning Operator Example
Less than A < B A=2;
B=3;
A<B
ans = 1
Less than or equal to A <= B A=2;
B=3;
A<=B
ans = 1
Equal A == B A=2;
B=3;
A==B
ans = 0
Greater than or equal to A >= B A=2;
B=3;
A>=B
ans = 0
Greater than A > B A=2;
B=3;
A>B
ans = 0
Not equal A ~= B A=2;
B=3;
A~=B
ans = 1

 

The area of interest is the Example column. The updated information will demonstrate the use of MATLAB in figuring out the relationships between expressions. Please let me know if you find any other errors in this book by contacting me at John@JohnMuellerBooks.com.

 

Getting Your MATLAB for Dummies Extras

The process of discovering how to use MATLAB begins when you get your copy of MATLAB for Dummies. However, it only starts there. Like many of my other books, you can also find online content for MATLAB for Dummies in these forms:

I always want to hear your questions about my books. Be sure to write me about them at John@JohnMuellerBooks.com. In the meantime, I hope you enjoy your MATLAB for Dummies reading experience. Thank you for your continued support.

Announcing MATLAB for Dummies

If you’ve ever wondered how to solve certain kinds of advanced mathematics, then MATLAB may fulfill the need for you. Schools are also using MATLAB as a teaching tool now because it provides so many visual aids. MATLAB for Dummies helps these two groups and many others. If you’ve wanted to use a product like MATLAB, but find the learning curve way too high, then you really do need this book. Here’s what you’ll find inside:

  • Part I: Getting Started With MATLAB
    • Chapter 1: Introducing MATLAB and its Many Uses
    • Chapter 2: Starting Your Copy of MATLAB
    • Chapter 3: Interacting with MATLAB
    • Chapter 4: Starting, Storing, and Saving MATLAB Files
  • Part II: Manipulating and Plotting Data in MATLAB
    • Chapter 5: Embracing Vectors, Matrices, and Higher Dimensions
    • Chapter 6: Understanding Plotting Basics
    • Chapter 7: Using Advanced Plotting Features
  • Part III: Streamlining MATLAB
    • Chapter 8: Automating Your Work
    • Chapter 9: Expanding MATLAB’s Power with Functions
    • Chapter 10: Adding Structure to Your Scripts
  • Part IV: Employing Advanced MATLAB Techniques
    • Chapter 11: Importing and Exporting Data
    • Chapter 12: Printing and Publishing Your Work
    • Chapter 13: Recovering from Mistakes
  • Part V: Specific MATLAB Applications
    • Chapter 14: Solving Equations and Finding Roots
    • Chapter 15: Performing Analysis
    • Chapter 16: Creating Super Plots
  • Part VI: Part of Tens
    • Chapter 17: Top Ten Uses of MATLAB
    • Chapter 18: Ten Ways to Make a Living Using MATLAB
  • Appendix A: MATLAB’s Functions
  • Appendix B: MATLAB’s Plotting Routines
  • Appendix C: Geometry, Pre-calculus, and Trigonometry Review

This book starts out simply and gently introduces you to the various tasks that MATLAB can perform. By the time you get done, you can perform many basic and a few complex tasks with MATLAB. The important part is that you’ll be in a position to use the tutorials and other learning aids that MathWorks provides to use with MATLAB. Making the learning process both simple and enjoyable is the main goal of this book. When dealing with a complex product such as MATLAB, you really do need the simpler introduction.

MATLAB is an amazing product. Once you start using it, you’ll wonder how you ever got along without it. Not only does it help you solve complex math problems, but you can also use it for a wide range of plotting needs (many of which are covered in the book). This book also acts as an idea generator to help you better use the capabilities of MATLAB. It’s amazing to discover just how many people use MATLAB and the ways in which they employ it.

I want to be sure you have the best possible learning experience. If you have any questions about this book, please feel free to contact me at John@JohnMuellerBooks.com. Please keep your questions book-specific. If you have questions about MATLAB as a product, please address those questions to MathWorks. I’ll be providing more posts about this book soon, so please come back to my blog to discover more about MATLAB for Dummies.

 

Beta Readers Needed for MATLAB for Dummies

Math is the basis for a good many human endeavors and we often use it without thinking about it. For example, when you go to the store to buy groceries, the clerk who checks you out relies on math to compute how much you owe. Perhaps you also used math as you shopped to ensure that you didn’t go over your budget. In addition, you might have used math to convert one unit of measure to another so that you’d know how much of a particular item to get. In looking at two similar products, you used math to decide which one offered a better deal. You get the idea. It truly isn’t possible to perform even the simplest task without using math in some way.

As the use of math for performing a task becomes more complex, so does the need for precision, accuracy, and an understanding of how math works. MATLAB is a product designed to help people perform complex math tasks more efficiently, accurately, and with less effort. In addition, you obtain a level of precision that only a computer can provide consistently. However, MATLAB itself is somewhat complex, which is why I’m writing MATLAB for Dummies with my coauthor Jim Sizemore (The Fun Physicist who has extensive MATLAB experience). The two of us want to make your MATLAB experience fun and interesting. With this in mind, we’ve put together the following outline:

 

  • Part I: Getting Started With MATLAB
    • Chapter 1: Introducing MATLAB and its Many Uses
    • Chapter 2: Starting Your Copy of MATLAB
    • Chapter 3: Interacting with MATLAB
    • Chapter 4: Starting, Storing, and Saving MATLAB Files
  • Part II: Manipulating and Plotting Data in MATLAB
    • Chapter 5: Embracing Vectors, Matrices, and Higher Dimensions
    • Chapter 6: Understanding Plotting Basics
    • Chapter 7: Using Advanced Plotting Features
  • Part III: Streamlining MATLAB
    • Chapter 8: Automating Your Work
    • Chapter 9: Expanding MATLAB’s Power with Functions
    • Chapter 10: Adding Structure to Your Scripts
  • Part IV: Employing Advanced MATLAB Techniques
    • Chapter 11: Importing and Exporting Data
    • Chapter 12: Printing and Publishing Your Work
    • Chapter 13: Recovering from Mistakes
  • Part V: Specific MATLAB Applications
    • Chapter 14: Solving Equations and Finding Roots
    • Chapter 15: Performing Analysis
    • Chapter 16: Creating Super Plots
  • Part VI: Part of Tens
    • Chapter 17: Top Ten Uses of MATLAB
    • Chapter 18: Ten Ways to Make a Living Using MATLAB
  • Appendix A: MATLAB’s Functions
  • Appendix B: MATLAB’s Plotting Routines
  • Appendix C: Geometry, Pre-calculus, and Trigonometry Review


As you can see, this book is going to give you a good start in using all the functionality that MATLAB has to offer. Because of the subject matter, I really want to avoid making any errors in book, which is where you come into play. I’m looking for beta readers who use math as part of their profession and think they might be able to benefit from the functionality that MATLAB provides. As a beta reader, you get to see the material as Jim and I write it. Your comments will help us improve the text and make it easier to use.

In consideration of your time and effort, your name will appear in the Acknowledgements (unless you specifically request that we not provide it). You also get to read the book free of charge. Being a beta reader is both fun and educational. If you have any interest in reviewing this book, please contact me at John@JohnMuellerBooks.com and will fill in all the details for you.