Kristian
Kristian

Reputation: 1239

MatLab - structure and field arrays

I'm learning MatLab on my own. I have a question regarding a field example that is used in my textbook. We define:

FallSem.course = char('cs101','phy200','math211');
FallSem.prof = char('Turling','Fiegenbaum','Ramanjuan');
FallSem.score = [80 75 95; 72 75 78; 85 35 66];

Is there any command I can type that will display all the contents of FallSem? I know how to access data in the different fieds (for instance, I can type FallSem.course(1,:) to get cs101 to appear), but if I type simply FallSem or FallSem(1) (FallSem is a 1 x 1 structure), all I get is general information about the fields such as:

FallSem = 

    course: [3x7 char]
      prof: [3x10 char]
     score: [3x3 double]

So if anyone knows any command which will let me display all the data contained, I would greatly appreciate it!

Upvotes: 3

Views: 1074

Answers (1)

david.s
david.s

Reputation: 11403

AFAIK there's no built-in function in Matlab for displaying structures, but you can use this function.

Upvotes: 3

Related Questions