Effacer les filtres
Effacer les filtres

What does it mean when it is said that a struct is a 2-by-3 struct?

3 vues (au cours des 30 derniers jours)
Rightia Rollmann
Rightia Rollmann le 8 Fév 2017
Modifié(e) : Stephen23 le 8 Fév 2017
What does it mean when it is said that a struct is a 2-by-3 struct?

Réponse acceptée

Stephen23
Stephen23 le 8 Fév 2017
Modifié(e) : Stephen23 le 8 Fév 2017
Just like a numeric array, a structure array can be scalar, vector, matrix, or ND. If you have been using structures already then most likely they were scalar structures.
Here is a scalar numeric array:
X = 3
X has size 1x1.
Here is a vector numeric array:
X(1) = 2
X(2) = 3
X(3) = 5
X has size 1x3.
Here is a scalar structure array:
S.field = 1
Here is a vector structure array:
S(1).field = 2
S(2).field = 3
S(3).field = 5
The structure S has size 1x3. Read more here:

Plus de réponses (1)

Adam
Adam le 8 Fév 2017
It means it is a 2x3 matrix of struct objects - i.e. 6 objects of a struct, arranged in 2 rows and 3 columns

Catégories

En savoir plus sur Structures dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by