Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use Matlab Please Array of Structures Create a function CreateArrayOfStructure to create an array of structs pizzaslnStore with 3 fields: one field is name that
Use Matlab Please
Array of Structures Create a function CreateArrayOfStructure to create an array of structs pizzaslnStore 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 an integer with the total calories. The first item in pizzasln Store 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 Save Reset MATLAB Documentation 1 function pizzas!nstore = createArrayofstructure(numbercalofBBQ) 21 % 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 51 % and the calories equals 5 calories less that the Barbecue pizza. 6 % Ham and cheese pizza, the ingredients are Ham, cheese, bacon 71 % and the calories equals that of the Barbecue pizza 91% Your code goes here % 11 end 13 Code to call your function I numbercalofBBQ=38; 2 pizzasInstore CreateArrayofstructure (numberCalofBBQ)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started