Question: MATLAB Array of Structures Create a function CreateArrayOf Structure to create an array of structs pizzasln Store with 3 fields: one field is name that

MATLAB

MATLAB Array of Structures Create a function CreateArrayOf Structure to create an

Array of Structures Create a function CreateArrayOf Structure to create an array of structs pizzasln Store with 3 fields: one field is name that is a string with the name of the pizza, next is ingredients that is a string with the ingedients, and the third calories that is a numeric with the total calories. The first item in pizzasinStore is associated with the "Barbecue" pizza, then "Carbonara" and finally "Ham and Cheese". In a "Barbecue" pizza, the ingredients are "Beef, chicken, bacon, barbecue sauce" and the calories equals an integer, which is an input parameter of the function CreateArrayOfStructure. In a "Carbonara" pizza, the ingredients are "Mushrooms, onion, creamy sauce" and the calories equals 5 calories less that the "Barbecue" pizza. In a "Ham and Cheese" pizza, the ingredients are "Ham, cheese, bacon" and the calories equals the "Barbecue" pizza. Your Function E Save Reset MATLAB Documentation I function pizzas!nstore = createArray0fstructure(numbercalofBBQ) 2 % Barbecue pizza, the ingredients are Beef, chicken, bacon, barbecue sauce 3 % and the calories equals an integer variable. 4 % carbonara pizza, the ingredients are Mushrooms , onion, creamy sauce 5 % and the calories equals 5 calories less that the Barbecue pizza. 6 % Ham and Cheese pizza, the ingredients are Ham, cheese, bacon 7 % and the calories equals that of the Barbecue pizza 8 9% Your code goes here % 10 11 end 12 ES Code to call your function C Reset 1 numberCalofBBQ-30; 2 pizzasInStore - CreateArrayofstructure(numberCalofBBQ)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!