## Yazar Arşivi

### Logical Subscripting

Monday, May 10th, 2010

The logical vectors created from logical and relational operations can be used to reference subarrays. Suppose X is an ordinary matrix and L is a matrix of the same size that is the result of some logical operation. Then X(L) specifies the elements of X where the elements of L are nonzero. This kind of […]

### The find Function

Sunday, May 9th, 2010

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, k = find(isprime(A))’ picks out the locations, using one-dimensional indexing, of the primes in the […]

### Linear Algebra

Saturday, May 8th, 2010

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. Dürer’s magic square A = 16 3 2 13 5 10 11 8 9 6 7 12 4 15 […]

### Working with 8-Bit and 16-Bit Images

Saturday, May 8th, 2010

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 […]

### The magic Function

Saturday, May 8th, 2010

MATLAB actually has a built-in function that creates magic squares of almost any size. Not surprisingly, this function is named magic. B = magic(4) B = 16 2 3 13 5 11 10 8 9 7 6 12 4 14 15 1 This matrix is almost the same as the one in the Dürer engraving […]