Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
reading / 2020 Moler-Mathwork Summary.pdf
Скачиваний:
1
Добавлен:
25.12.2023
Размер:
8.4 Mб
Скачать

A History of MATLAB

81:35

produces

h =

'hello world'

disp(h)

'hello world'

d = uint8(h)

d=

1×11 uint8 row vector

104

101

108

108

111

32

119

111

114

108

100

Short character strings are often used as optional parameters to functions.

[U,S,V] = svd(A,'econ'); % Economy size, U is the same shape as A.

plot(x,y,'o-') % Plot lines with circles at the data points.

Multiple lines of text, or many words in an array, must be padded with blanks so that the character array is rectangular. The char function provides this service. For example, here is a 3-by-7 array.

class = char('Alice','Bob','Charlie');

class =

3×7 char array 'Alice ' 'Bob ' 'Charlie'

Or, you could use a cell array.

class = {'Alice', 'Bob', 'Charlie'}'

class =

3×1 cell array {'Alice' } {'Bob' } {'Charlie'}

Recently, a comprehensive string data type was introduced.(see Section 5.10).

4.11 Evolution of the MathWorks Logo

MathWorks is perhaps the only company in the world that has the solution to a partial differential equation as its logo. The graphic has evolved over the years [na Moler 2014c; na Moler 2014e; na Moler 2014d; na Moler 2014b; na Moler 2014a] from a two-dimensional contour plot—a versionFFa of which appeared in Cleve Moler’s PhD dissertation [Moler 1965, Figure (8.15)]—to a black-and- white three-dimensional surface plot, to the same three-dimensional plot with various color schemes and lighting models (see Figure 17).

Proc. ACM Program. Lang., Vol. 4, No. HOPL, Article 81. Publication date: June 2020.