Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help in MatLab A chemical plant produces two types of chemicals, A and B. The plant has two production lines, Line 1 and Line

Need help in MatLab

image text in transcribedimage text in transcribed

A chemical plant produces two types of chemicals, A and B. The plant has two production lines, Line 1 and Line 2 . The production capacity of Line 1 is higher than that of Line 2 . The plant receives orders for chemicals A and B from customers. Write a MATLAB program to determine which production line should be used to fulfil each customer's order based on the following criteria: - If the customer's order is for chemical A and the total quantity ordered is less than or equal to 1000kg, use Line 1 . - If the customer's order is for chemical A and the total quantity ordered is more than 1000kg, use Line 2. - If the customer's order is for chemical B, use Line 2 regardless of the quantity ordered. The program should read in the following inputs: - The type of chemical (A or B) - The total quantity ordered (in kg) % Define inputs chemical = quantity = % Determine production line if % if the chemical is A if else end elseif else fprintf( ) return; % exit the program end % Print result fprintf('The production line that should be used is . ln

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

Principles and Modern Applications of Mass Transfer Operations

Authors: Jaime Benitez

2nd edition

470181788, 470181782, 978-1-119-0427, 978-0470181782

More Books

Students also viewed these Chemical Engineering questions