I’m using MATLAB and am calling a function that returns properties of the screen. Please see below:
>> Screen('resolution', 0)
ans =
width: 1280
height: 1024
pixelSize: 32
hz: 60
This is great, but I only want to access the ‘width’ parameter. I don’t know whether this is classed as a ‘paired array’ or simply a list, but basically I’m interested in extracting just the first element; the ‘width’.
Any ideas?
The answer you get from
Screenis an array of typestruct. You access the fields of a structure array with avariableName.fieldNamesyntax.