Question
This program is to be coded in MATLAB and CANNOT contain any conditional statements (if then, switches, etc). I'm not sure I have coded the
This program is to be coded in MATLAB and CANNOT contain any conditional statements (if then, switches, etc). I'm not sure I have coded the total cost correctly. My code so far is pasted down below after the instructions.
clc
clear
close all
%create cell array to store material information material={'Concrete',12,30,85000,900,4,4;'Wood',18,50,100000,800,12,10;'Adobe',15,42,55000,600,4,5}; %use menu to ask user material choice=menu('Select material',material{1,1},material{2,1},material{3,1}); %set total surface area of wall to 3000 sq ft SA=3000; %convert from in to ft thickness=material{choice,2}/12; %calculate total cost total_cost=thickness.*material{choice,3}.*SA.*material{choice,5}.*material{choice,6}./material{choice,7}+material{choice,4};
Background A local zoo, thanks to a new breeding program for endangered species, has successfully birthed two new, healthy elephants. The zoo will spend several years preparing these elephants to be released into the wild. While they are preparing these elephants for their eventual release, the zoo has noticed an increase in attention for these beautiful creatures. In order to expand revenue for thein breeding program to include other endangered species, they have plans to create a new enclosure area so the elephants can play and grow, while visitors observe them. The zoo asks your company specifically to provide a program that can perform a breakeven analysis on the different materials and construction methods, and determine the expected return on investment. This analysis will aid in predicting what other species can be added using the profit from this new enclosure. Specifically, your program must consider construction costs (fixed costs), various operational costs (variable costs), and the revenue dependent on interest level of the public. Calculation Procedure for Construction (Fixed Cost) The program that you create will perform a complete Breakeven Analysis for a single construction option. Your team then should be able to perform several complete Breakeven Analyses in order to provide the final financial benefits of a single construction option. To begin, your team must calculate the total cost of construction for three different construction materials. The total construction cost will be the "fixed cost" of your analysis. To begin, there will be 3 construction materials to choose from and all the information MUST be contained within one 3 x7 cell array. The cell array will be organized as below (do NOT include the titles highlighted in gray) Miscellaneous Construction Materials Number of Laborers eople 4 12 4 Number of weeks of construction 4 10 Thickness of Material cost Labor Cost [s/(person week) 900 800 600 Material wall [in] [s/ft3] Concrete Wood Adobe 85,000 100,o00 55,000 12 0 0 2 18 The program should use a menu listing three material options: Concrete, Wood, or Adobe, pulled from the cell array. You may NOT hardcode or use an "if statement/switch statement" to retrieve these names. This menu should automatically change should the cell array be altered as to the number and types of materials . The program should set the total surface area of the wall to be 3000 square feet. The program should then calculate the total cost of construction considering all costs above, in appropriate units. You should use this total as your fixed cost . Note: In all your calculations, your numbers should be able to automatically adjust should more materials be added to the cell array. No credit will be given to hardcoded values or the use of "if statements/switch statementsStep 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