Posts Tagged ‘matlab’
The find Function
The find function determines the indices of array elements that meet a given logical
condition. In its simplest form, find returns a column vector of indices. Transpose that
vector to obtain a row vector of indices. For example, Read More
Linear Algebra
Informally, the terms matrix and array are often used interchangeably. More precisely, a
matrix is a two-dimensional numeric array that represents a linear transformation. The
mathematical operations defined on matrices are the subject of linear algebra. Read More
Working with 8-Bit and 16-Bit Images
8-Bit and 16-Bit Indexed Images
Double-precision (64-bit) floating-point numbers are the default MATLAB representation for numeric data. However, to reduce memory requirements for working with images, you can store images as 8-bit or 16-bit unsigned integers using the numeric classes uint8 or uint16, respectively. An image whose data matrix has class uint8 is called an 8-bit image; an image whose data matrix has class uint16 is called a 16-bit image. Read More
The magic Function
MATLAB actually has a built-in function that creates magic squares of almost any size.
Not surprisingly, this function is named magic. Read More
Matlab Image Types
Indexed Images
An indexed image consists of a data matrix, X, and a colormap matrix, map. map is an m-by-3 array of class double containing floating-point values in the range [0, 1]. Each row of map specifies the red, green, and blue components of a single color. An indexed image uses “direct mapping” of pixel values to colormap values. The color of each image pixel is determined by using the corresponding value of X as an index into map. Values of X therefore must be integers. The value 1 points to the first row in map, the value 2 points to the second row, and so on. Display an indexed image with the statements Read More
The Colon Operator
The colon, :, is one of MATLAB’s most important operators. It occurs in several different
forms. The expression Read More
Working with Images in MATLAB Graphics
What Is Image Data?
The basic MATLAB data structure is the array, an ordered set of real or complex elements. An array is naturally suited to the representation of images, real-valued, ordered sets of color or intensity data. (An array is suited for complex-valued images.) Read More