Main Content

nnsize

Number of neural data elements, samples, timesteps, and signals

Syntax

[N,Q,TS,M] = nnsize(X)

Description

[N,Q,TS,M] = nnsize(X) takes neural network data x and returns,

N

Vector containing the number of element sizes for each of M signals

Q

Number of samples

TS

Number of timesteps

M

Number of signals

If X is a matrix, N is the number of rows of X, Q is the number of columns, and both TS and M are 1.

If X is a cell array, N is an Sx1 vector, where M is the number of rows in X, and N(i) is the number of rows in X{i,1}. Q is the number of columns in the matrices in X.

Examples

This code gets the dimensions of matrix data:

x = [1 2 3; 4 7 4]
[n,q,ts,s] = nnsize(x)

This code gets the dimensions of cell array data:

x = {[1:3; 4:6] [7:9; 10:12]; [13:15] [16:18]}
[n,q,ts,s] = nnsize(x)
Introduced in R2010b