This function is not very general... The reshape will work only for 65 EEG channels (and only if the electrodes are correctly labeled)
Concerning the note:
"Note: for some reason, bdf format specifies separate sets of "fs", "gain", "ChanDim", and "prefiltering" or every EEG channel. This function returns these values for the first channel (electrode) only!
This is a big mistake for chanDim: for instance with biosemi you can also record peripheral signals that are not in uV (like electrodermal activity in nS)