Question: ENGR 1 2 0 4 Programming Languages in Engineering Homework 3 The first problem is from S . Attaway, MATLAB - A Practical Introduction to

ENGR 1204 Programming Languages in Engineering
Homework 3
The first problem is from S. Attaway, MATLAB - A Practical Introduction to Programming and
Problem Solving (6th Edition).
For each problem, print out the script file if created along with the function file(s) and the
relevant Command Window output. Also, show analytical work where appropriate.
(50 points) Chapter 6- Exercise 18
Test your program using the triangle with three points (0,0),(1,0), and (0,1).
(50 points) The cost of manufacturing n units (where n is an integer) of a particular product
at a factory is given by the equation:
c(n)=5n2-44n+11
a) Write a script mfgcost that will
prompt the user for the number of units n
call a function costn that will calculate and return the cost of manufacturing n units
print the result (the format must be exactly as shown below)
b) Next, write the function costn, which simply receives the value of n as an input
argument, and calculates and returns the cost of manufacturing n units.
Here is an example of executing the script:Enter the number of units: 100
The cost for 100 units will be $45611.00
c) Verify the result shown for n=100 and for n= ###, where ### are the last three
digits of your student ID number.
use MATLAB to show work.
ENGR 1 2 0 4 Programming Languages in Engineering

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 Programming Questions!