Write a MATLAB file that prompts the user to input the width and height of a squ
ID: 2072568 • Letter: W
Question
Write a MATLAB file that prompts the user to input the width and height of a square tube and then calculates the volume of the square pipe. You and your room-mate decide to purchase Christmas Tree Lights on sale at Walmart. You decide to purchase a set of 10 lights consisting of 1-Watt light bulbs all in series. By the way, not all Christmas Tree Lights are a series circuit type design. Questions: a) If this circuit is plugged into an AC ('wall outlet*) with voltage source of V(t) = 120*cos(377 t) Volts, calculate the magnitude of the current through ONE of the lights and state the AC frequency of the current in Hertz; also draw the circuit, b) Finally, state one engineering design factor/issue you as an engineer would suggest to your boss for improving the circuit in terms of failures or reliability. If you state "the lights should be brighter" or "series is the best design" you will not receive any points - be creative and rational in your problem solving technique.Explanation / Answer
MATALB Code
clc
clear all
close all
%% Suqare tube must have all sides equal
Width=input('Enter the width of Pipe: ')
Height=input('Enter the height of Pipe: ')
if(Width==Height)
Volume=Width*Width*Width;
else
error('It is rectangle. Please enter square dimensions')
end
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.