Top "Matlab-struct" questions

For questions about the MATLAB structure datatype.

Iterating through struct fieldnames in MATLAB

My question is easily summarized as: "Why does the following not work?" teststruct = struct('a',3,'b',5,'c',9) fields = fieldnames(teststruct) …

matlab matlab-struct
How do I access structure fields dynamically?

I have a structure with many fields which are vectors of different lengths. I would like to access the fields …

matlab matlab-struct
access struct data (matlab)

a= struct('a1',{1,2,3},'a2',{4,5,6}) how can Iget the value of 1; I try to use a.a1{1} which return …

matlab matlab-struct
How can I display and access structure array contents in MATLAB?

Firstly, I have the user input their own text files consisting of states, capitals, and populations and I put all …

arrays matlab matlab-struct
How to sort structure arrays in MATLAB?

I'm working with an image retrieval system using color histogram intersection in MATLAB. This method gives me the following data: …

arrays matlab sorting matlab-struct
MATLAB: Determine total length/size of a structure array with fields as structure arrays

I have a structure array containing fields as structure arrays of varying length. For example: 's' is a structure 'data' …

arrays matlab memory-management matlab-struct
How to put a struct in a struct

I just started using Matlab, and I absolutely despise (or not properly understand), the typesystem (or lack thereof). Why does …

matlab matlab-struct
Convert struct to double type in Matlab

Glcm (feature extraction method) give me an output in 'struct' type, while i need the output in 'double' type. I …

matlab struct double matlab-struct
How can I count the number of properties in a structure in MATLAB?

I have a function that returns one or more variables, but as it changes (depending on whether the function is …

matlab matlab-struct
Convert struct to matrix MATLAB

Is there a way to convert a struct (2 fields with 52 variables each) to a matrix (2x52)? Thank you struct: sym (1…

matlab matrix struct matlab-struct