print from the structureto print from the


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

Request for Solution File

Ask an Expert for Answer!!
Applications of MATLAB: print from the structureto print from the
Reference No:- TGS0175105

Expected delivery within 24 Hours