Print from the structure:
To print from the structure, a disp function will show either the whole structure or a field.
>> disp(package)
item_no: 123
cost: 19.9900
price: 39.9500
code: 'g'
>> disp(package.cost)
19.9900
Though, using fprintf, only the individual fields can be printed; the whole structure cannot be printed.
>> fprintf('%d %c\n', package.item_no, package.code)
123 g