{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ABCs_structures

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

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

function [A B C D E F G H I J xlsNum xlsText xlsRaw] = ABCs_structures(a_name, a_number, b_name, b_number, st1, st2, f1, var1, xlsIn) % 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 'number'. In the first field, 'name', store the value of % a_name. In the second field, 'number', store the value of a_number. 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.number = a_number; A % b) Creating structures using struct(). Create a structure with two % fields: 'name' and 'number'. In the first field, 'name', store the value % of b_name. In the second field, 'number', store the value of b_number. % You *MUST* use the function struct() for this problem. % % Store your answer in the variable B. Write your code here: B = struct('name',b_name,'number',b_number); %<fix this code>% B % c) setfield(). Create a structure that is the same as st1, but the field

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 xlsNum...

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

View Full Document
Ask a homework question - tutors are online