Code covered by the BSD License  

Highlights from
mat2struct

Be the first to rate this file! 0 Downloads (last 30 days) File Size: 1.53 KB File ID: #5254

mat2struct

by Stefano Gianoli

 

15 Jun 2004 (Updated 17 Jun 2004)

Convert array to structure array.

| Watch this File

File Information
Description

MAT2STRUCT Convert array to structure array.
  S = MAT2STRUCT(X,FIELDS,DIM,M,N) converts the array X into
  the structure S by folding the dimension DIM of X into fields of
  S. SIZE(X,DIM) must match the number of field names in FIELDS.
  FIELDS can be a character array or a cell array of strings.

   X is an array of size [ROW COL], M is the vector of row sizes (must sum to ROW) and N is the vector of column sizes (must sum to COL). The elements of M and N determine the size of each cell in X by satisfying the following formula for I = 1:LENGTH(M)
  and J = 1:LENGTH(N),

      SIZE(X{I,J}) == [M(I) N(J)]

MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
matrices Stefano Gianoli 22 Oct 2008 07:23:56
matrix Stefano Gianoli 22 Oct 2008 07:23:56
structure Stefano Gianoli 22 Oct 2008 07:23:56
utilities Stefano Gianoli 22 Oct 2008 07:23:56
manipulation Stefano Gianoli 22 Oct 2008 07:23:56
conversion Stefano Gianoli 22 Oct 2008 07:23:56
conversion Dave Holden 23 Jan 2011 20:29:47

Contact us at files@mathworks.com