Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given a set of package weight data write a MATLAB program that wit 1 Import the package weights (using load) 2. Determine and display the

image text in transcribed
image text in transcribed
Given a set of package weight data write a MATLAB program that wit 1 Import the package weights (using load) 2. Determine and display the total weight of all the packages, assign it to totalWeight 3. Determine and display the main package weight, assign it to mean Weight 4. Determine which package weights are greater than five pounds. The result should be an array of indices corresponding to the packages with weights greater than five pounds gestio Index 95 5. Determine which package weights are less than or equal to one pound. The result should be an array of logical corresponding to the packages wm weighan or equal to one point, i resu to boolean le 1 6. Use the array of indien determined in Part 4) to extract index) the package weights greater than five pounds and save these weight in a new arrayssintown 7. Use the array of logicalBolions determined in Part to extract the weight loss than or equal to one pound and save these weight na new any sign it to weight Determine and display the number of packages that weigh more than five pounds, signo num package 16 The package weight data is stored in the MATLAB workspace data le package. not. The data is in a 10 array named packagewetents and the weights are in pounds. The MATLAB statement Soad'package.wat''packages will load the package weight wible from the MATLAB Workspace data til Make sure the data is in the same folder as your program and make sure place the load statement at the clear and cle commands do not use it for MATLAB grader otherwise you will clear the variables that were just loaded . Make sure your variable names oorwey whether the variable holde data values), Indions, or logical Booleans The program should work for any set of package weights of the same format not just the set given here You better do it on your own computer fest. Make sure to download the mat file Script OR MATLAB Documento * 11. Import the package weights (usine Toad). load Cracket chat Determine and display the total weight of all the packages, assign it to totalight totaleht 3. Determine and display the nean pattage weight, assle it to meet benwicht 10 11 11 X. Determine which package weights are greater than five pounds. The result should be an array of Indices corresponding tu the packages with writs erwaterman assion result to index_et_S Index_cts 1 5. Determine which package weights are less than or equal to one pound. The result should be an array of logical corresponding to the packages with lots lets 17 Kassion result to boolean le 1 18 boolean le_1 S6. Use the array of Indices determined in Part 4) to extract (Index) the package weights greater that live pounds and save these weights in a new array, nueit 21 Weight et 5 23. Use the array of logicals/Booleans determined in Part 5) to extract the weights less than or equal to one pound and save these werpts in array at weight_le_1 8.Determine and display the number of packages that weigh more than five pounds, assign it to un garaget In package Et 5 = Given a set of package weight data write a MATLAB program that wit 1 Import the package weights (using load) 2. Determine and display the total weight of all the packages, assign it to totalWeight 3. Determine and display the main package weight, assign it to mean Weight 4. Determine which package weights are greater than five pounds. The result should be an array of indices corresponding to the packages with weights greater than five pounds gestio Index 95 5. Determine which package weights are less than or equal to one pound. The result should be an array of logical corresponding to the packages wm weighan or equal to one point, i resu to boolean le 1 6. Use the array of indien determined in Part 4) to extract index) the package weights greater than five pounds and save these weight in a new arrayssintown 7. Use the array of logicalBolions determined in Part to extract the weight loss than or equal to one pound and save these weight na new any sign it to weight Determine and display the number of packages that weigh more than five pounds, signo num package 16 The package weight data is stored in the MATLAB workspace data le package. not. The data is in a 10 array named packagewetents and the weights are in pounds. The MATLAB statement Soad'package.wat''packages will load the package weight wible from the MATLAB Workspace data til Make sure the data is in the same folder as your program and make sure place the load statement at the clear and cle commands do not use it for MATLAB grader otherwise you will clear the variables that were just loaded . Make sure your variable names oorwey whether the variable holde data values), Indions, or logical Booleans The program should work for any set of package weights of the same format not just the set given here You better do it on your own computer fest. Make sure to download the mat file Script OR MATLAB Documento * 11. Import the package weights (usine Toad). load Cracket chat Determine and display the total weight of all the packages, assign it to totalight totaleht 3. Determine and display the nean pattage weight, assle it to meet benwicht 10 11 11 X. Determine which package weights are greater than five pounds. The result should be an array of Indices corresponding tu the packages with writs erwaterman assion result to index_et_S Index_cts 1 5. Determine which package weights are less than or equal to one pound. The result should be an array of logical corresponding to the packages with lots lets 17 Kassion result to boolean le 1 18 boolean le_1 S6. Use the array of Indices determined in Part 4) to extract (Index) the package weights greater that live pounds and save these weights in a new array, nueit 21 Weight et 5 23. Use the array of logicals/Booleans determined in Part 5) to extract the weights less than or equal to one pound and save these werpts in array at weight_le_1 8.Determine and display the number of packages that weigh more than five pounds, assign it to un garaget In package Et 5 =

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_2

Step: 3

blur-text-image_3

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

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

Students also viewed these Databases questions