Graphics Reference
In-Depth Information
sum (v)
Adds the components of V
prod (v)
Multiply the elements of V, with n! = prod(1:n)
cumsum (v)
Gives the vector of sums accumulated in V
cumprod (v)
Gives the vector of products accumulated in V
diff (v)
Gives the vector of first differences of V (Vt -Vt-1)
gradient (v)
The gradient of V
del2 (v)
Laplacian of V (5-point discrete)
fft (v)
Discrete Fourier transform of V
fft2 (v)
Two-dimensional discrete Fourier transform of V
ifft (v)
Reverse of the discrete Fourier transform of V
ifft2 (v)
Inverse of 2-D discrete Fourier transform of V
These functions also support as an argument a complex matrix, in which case the result is a vector whose
components are the results of applying the function to each column of the matrix.
Here are some examples:
>> V=2:7, W=[2-i 4i 5+3i]
V =
2 3 4 5 6 7
W =
2.0000 - 1.0000i 0 + 4.0000i 5.0000 + 3.0000i
>> diff(V),diff(W)
ans =
1 1 1 1 1
ans =
-2.0000 + 5.0000i 5.0000 - 1.0000i
>> cumprod(V),cumsum(V)
ans =
2 6 24 120 720 5040
ans =
2 5 9 14 20 27
Search WWH ::




Custom Search