ABCs_structures - function [A B C D E F G H I J] =...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 function [A B C D E F G H I J] = ABCs_structures(a_name, a_price, b_name, b_price, st1, st2, f1, var1) % PROBLEM 1. The ABCs of Structures % % This is a multi-part problem. Do each of the parts below. % % DO NOT CHANGE THE FUNCTION HEADER (the first line of code) % % a) Creating structures manually. Create a structure with two fields: % 'name' and 'price'. In the first field, 'name', store the value of % a_name. In the second field, 'price', store the value of a_price. Do % *NOT* use the functions struct() or setfield() for this problem. % % Store your answer in the variable A. Write your code here: A.name = 'a_name' A.price = 'a_price' % b) Creating structures using struct(). Create a structure with two % fields: 'name' and 'price'. In the first field, 'name', store the value % of b_name. In the second field, 'price', store the value of b_price. You % *MUST* use the function struct() for this problem. % % Store your answer in the variable B.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/06/2009 for the course CS 1371 taught by Professor Stallworth during the Fall '08 term at Georgia Institute of Technology.

Page1 / 2

ABCs_structures - function [A B C D E F G H I J] =...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online