Tag Archives: MATLAB

Preparing CMYK Figures for Book Printing

All printing is done in CMYK, the color space based on the four colors cyan, magenta, yellow, and black. Figures that we generate in MATLAB and other systems are invariably saved in RGB format (red, green, blue). When we send … Continue reading

Posted in books | Tagged , | Leave a comment

Good Times in MATLAB: How to Typeset the Multiplication Symbol

The MATLAB output >> A = rand(2); whos Name Size Bytes Class Attributes A 2×2 32 double will be familiar to seasoned users. Consider this, however, from MATLAB R2016b: >> s = string({‘One’,’Two’}) s = 1×2 string array “One” “Two” … Continue reading

Posted in LaTeX, software | Tagged | Leave a comment

MATLAB Guide, Third Edition (2017)

The third edition of MATLAB Guide, which I co-wrote with Des Higham, has just been published by SIAM. It is a major update of the second edition (2005) to reflect the many changes in MATLAB over the last twelve years, … Continue reading

Posted in books | Tagged , | Leave a comment

Hyphenation Question: Row-wise or Rowwise?

Sam Clark of T&T Productions, the copy editor for the third edition of MATLAB Guide (co-authored with Des Higham and to be published by SIAM in December 2016), recently asked whether we would like to change “row-wise” to “rowwise”. A … Continue reading

Posted in writing | Tagged | 1 Comment

What’s New in MATLAB R2016b

MATLAB R2016b was released in the middle of September 2016. In this post I discuss some of its new features (I will not consider the toolboxes). This is personal selection of highlights; for a complete overview see the Release Notes. … Continue reading

Posted in software | Tagged | Leave a comment

Implicit Expansion: A Powerful New Feature of MATLAB R2016b

The latest release of MATLAB, R2016b, contains a feature called implicit expansion, which is an extension of the scalar expansion that has been part of MATLAB for many years. Scalar expansion is illustrated by >> A = spiral(2), B = … Continue reading

Posted in software | Tagged | 10 Comments

The One-Line Maze Program in MATLAB

A classic one-line program for the Commodore 64 microcomputer is 10 PRINT CHR$(205.5+RND(1)); GOTO 10 This is essentially what was printed in the section “Random Graphics” of the Commodore 64 User’s Guide (1982). The program prints a random maze that … Continue reading

Posted in software | Tagged , | 3 Comments

Iterating MATLAB Commands

Some MATLAB commands can be “applied to themselves”. A good example is help help, which provides help on the help function. For what other functions fun is fun fun a legal statement that produces something interesting? Here are some examples … Continue reading

Posted in software | Tagged | 2 Comments

Improved MATLAB Function Sqrtm

The MATLAB function sqrtm, for computing a square root of a matrix, first appeared in the 1980s. It was improved in MATLAB 5.3 (1999) and again in MATLAB 2015b. In this post I will explain how the recent changes have … Continue reading

Posted in research | Tagged , | Leave a comment

A Collection of Invalid Correlation Matrices

I’ve written before (here) about the increasingly common problem of matrices that are supposed to be correlation matrices (symmetric and positive semidefinite with ones on the diagonal) turning out to have some negative eigenvalues. This is usually bad news because … Continue reading

Posted in research | Tagged , | Leave a comment