getfvb(A,M,N,mode)

Getting the first values of any M*N blocks size in Matrix
18 Downloads
Updated 19 Apr 2017

View License

GETFVB Get the first values of blocks of a matrix.
B = GETFVB(A,M,N) for a matrix A returns a matrix containing first values
of blocks with size [M N] of a matrix given A.

B = GETFVB(A,M,N,'vect') for a matrix A returns an arry containing first values
of blocks with size [M N] of a matrix given A.
If someone want to improuve or adding some changes, only let me know
about that

Examples:
A=[ 1 2 3 4
5 6 7 8
9 1 1 2
2 4 5 6 ]

B = getfvb(A,2,2)
% returns
B=[ 1 3
9 1 ]
B = getfvb(A,2,2,'vect')
% returns
B=[ 1 9 3 1]


A=[ 1 2 3 4
5 6 7 8
9 1 1 2
2 4 5 6 ]

B = getfvb(A,1,2)
% returns
B=[ 1 3
5 7
9 1
2 5 ]
B = getfvb(A,1,2,'vect')
% returns
B=[ 1 5 9 2 3 7 1 5]

Cite As

Said BOUREZG (2024). getfvb(A,M,N,mode) (https://www.mathworks.com/matlabcentral/fileexchange/62630-getfvb-a-m-n-mode), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0