Contenido principal

numsignals

(To be removed) Number of signals in neural network data

numsignals will be removed in a future release. For more information, see Transition Legacy Neural Network Code to dlnetwork Workflows.

For advice on updating your code, see Version History.

Syntax

numsignals(x)

Description

numsignals(x) takes neural network data x in matrix or cell array form, and returns the number of signals.

If x is a matrix, the result is 1.

If x is a cell array, the result is the number of rows in x.

Examples

This code calculates the number of signals represented by matrix data:

x = [1 2 3; 4 7 4]
n = numsignals(x)

This code calculates the number of signals represented by cell data:

x = {[1:3; 4:6] [7:9; 10:12]; [13:15] [16:18]}
n = numsignals(x)

Version History

Introduced in R2010b

collapse all