Question

MATLAB GOD! come and help me

Toy Company makes a variety of inexpensive toys f

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Matlab Code

vertical=0; %initialize vertical length to 0
horizontal=0;   %initialize horizontal length to 0
ulratio=-1; %initialize ulratio to a negetive number
noOfKites=1.1; %initialize noOfKites to a non integer number
while vertical<30   %continue asking for input until vertical length is not atleast 30 cm
    vertical=input('Enter the length of vertical beam in cm (>=5): ');
end
while horizontal<30 %continue asking for input until horizontal length is not atleast 30 cm
    horizontal=input('Enter the length of horizontal beam in cm (>=5): ');
end
while ulratio<=0    %continue asking for input until ulratio is not greater than 0
    ulratio=input('Enter the upper to lower ratio: ');
end
while rem(noOfKites,1)!=0   %continue asking for input until noOfKites is not an integer
    noOfKites=input('Enter the number of kites: ');
end

%calculate the values
minWidth=((1515*horizontal*noOfKites)/3000)/100;
minHeight=((70*vertical)/50)/100;
endWaste=(0.16*minWidth*minHeight)/10.605;
topAndBottomWaste=(2.90*minWidth*minHeight)/10.605;
percentWaste=(29*minWidth*minHeight)/10.605;

%display the calculated values
disp(' ');
disp(['Minimum Width: ', num2str(minWidth), ' m']);
disp(['Minimum Height: ', num2str(minHeight), ' m']);
disp(['End Waste: ', num2str(endWaste), ' m^2']);
disp(['Top and bottom waste: ', num2str(topAndBottomWaste), ' m^2']);
disp(['Percent waste: ', num2str(percentWaste), ' %']);

Output

Enter the length of vertical beam in cm (>=5) : 50 Enter the length of horizontal beam in cm (5) 30 Enter the upper to lower

Add a comment
Know the answer?
Add Answer to:
MATLAB GOD! come and help me Toy Company makes a variety of inexpensive toys for children...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • For this project, you are tasked with creating a text-based, basic String processing program that performs...

    For this project, you are tasked with creating a text-based, basic String processing program that performs basic search on a block of text inputted into your program from an external .txt file. After greeting your end user for a program description, your program should prompt the end user to enter a .txt input filename from which to read the block of text to analyze. Then, prompt the end user for a search String. Next, prompt the end user for the...

  • please help with no 3,4,5 and 6 Thanks 1. What is standard error? Measure of statistical...

    please help with no 3,4,5 and 6 Thanks 1. What is standard error? Measure of statistical accuracy of an estimate, equal to the standard deviation of the theorental distribution of a large populanon of such estimates 2. What calculation is used to describe the variation in measurements. 3. In experiment 3.2. You will be measuring out 40ml of volume. How many times will you measure 40 ml? 4. What is the difference for each time you measure out 40ml? In...

  • Game Description: Most of you have played a very interesting game “Snake” on your old Nokia...

    Game Description: Most of you have played a very interesting game “Snake” on your old Nokia phones (Black & White). Now it is your time to create it with more interesting colors and features. When the game is started a snake is controlled by up, down, left and right keys to eat food which appears on random locations. By eating food snake’s length increases one unit and player’s score increases by 5 points. Food disappears after 15 seconds and appears...

  • #include <iostream> #include <iomanip> #include <vector> using namespace std; Part 1. [30 points] In this part,...

    #include <iostream> #include <iomanip> #include <vector> using namespace std; Part 1. [30 points] In this part, your program loads a vending machine serving cold drinks. You start with many foods, some are drinks. Your code loads a vending machine from foods, or, it uses water as a default drink. Create class Drink, make an array of drinks, load it and display it. Part 1 steps: [5 points] Create a class called Drink that contains information about a single drink. Provide...

  • THE WAR ON ALLERGIES SUPPOSE THAT 54.3 PERCENT of your country's population had cancer. That figure...

    THE WAR ON ALLERGIES SUPPOSE THAT 54.3 PERCENT of your country's population had cancer. That figure might set off a nationwide panic-a search for something wrong with people's diet, the environment, activity levels. In fact, that's the percentage of Americans who show a positive skin response to one or more allergens. A1 5 B The manifestations' of allergy-sneezing, itching, rashes-are signs of an une system running amok,2 attacking foreign invaders-allergens- that mean no harm. Allergens include pollen, dust mites, mold,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT