{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ABCs_structures

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

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

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.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online