Main Content

size

Class: bioma.data.ExptData
Namespace: bioma.data

Return size of ExptData object

Syntax

NFeatSam = size(EDObj)
[NFeatures, NSamples] = size(EDObj)
DimLength = size(EDObj, Dim)

Description

NFeatSam = size(EDObj) returns a two-element row vector containing the number of features and number of samples in an ExptData object.

[NFeatures, NSamples] = size(EDObj) returns the number of features and number of samples in an ExptData object as separate variables.

DimLength = size(EDObj, Dim) returns the length of the dimension specified by Dim.

Input Arguments

EDObj

Object of the bioma.data.ExptData class.

Dim

Scalar specifying the dimension of the ExptData object. Choices are:

  • 1 — Features

  • 2 — Samples

Examples

Construct an ExptData object, and then determine the number of features and samples in it:

% Import the bioma.data namespace to make constructor functions
% available
import bioma.data.*
% Create DataMatrix object from .txt file containing 
% expression values from microarray experiment
dmObj = DataMatrix('File', 'mouseExprsData.txt');
% Construct ExptData object
EDObj = ExptData(dmObj);
% Retrieve the number of features and samples
NumFeatSam = size(EDObj)