Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions

Question

define EFFECTIVE PARTICIPATION

Answered: 1 week ago