Question
% load the container weights and container volumes %load('container.mat ','conWt', 'conVol'); % we will generate the vector covWt and conVol randomly here for testing purpose
% load the container weights and container volumes
%load('container.mat ','conWt', 'conVol');
% we will generate the vector covWt and conVol randomly here for testing purpose
n = randi([15 25]) % Random number of containers between 15 to 25
conWt = randi([5,100], 1, n)
conVol= randi([1000 3000], 1,n)
%Determine how many containers have a fill weight greater than 10 kg, assign it to wt_gt_10
wt_gt_10 = 0
%Determine the mean density of the containers. Container density is container mass (weight) divided by container volume and can be computed using p=m/V.
p = 0
%Find Logic vector that corresponding to containers having a density greater than 0.02 kg/cm3 but less than 0.05 kg/cm3, conDenBoolean_gt_002
conDenBoolean_gt_002 = 0
%Determine which containers (in terms of indices) have a density greater than 0.01 kg/cm3, conDenIdx_gt_001
conDenIdx_gt_001 = 0
%Determine the total fill weights of the containers with a density greater than 0.01 kg/cm3, assign it to wt_Den_gt_001
wt_Den_gt_001 =0
Given a 1D array of container fill weights in kg named conWt and 1D array of container volumes in cm^3 named convol(assumed loaded from MATLAB workspace file, we will generate the conWt and conVol randomly here), complete the MATLAB program using the comment skeleton of below that will: 1. Determine how many containers have a fill weight greater than 10 kg. 2. Determine the mean density of the containers. Container density is container mass (weight) divided by container volume and can be computed using p=m V 3. Find Logic vector that corresponding to containers having a density greater than 0.02 kg/cm3 but less than 0.05 kg/cm3, assign it to conDenBoolean_gt_002 4. Determine which containers have a density greater than 0.01 kg/cm3. 5. Determine the fill weights of the containers with a density greater than 0.01 kg/cm3. Given a 1D array of container fill weights in kg named conWt and 1D array of container volumes in cm^3 named convol(assumed loaded from MATLAB workspace file, we will generate the conWt and conVol randomly here), complete the MATLAB program using the comment skeleton of below that will: 1. Determine how many containers have a fill weight greater than 10 kg. 2. Determine the mean density of the containers. Container density is container mass (weight) divided by container volume and can be computed using p=m V 3. Find Logic vector that corresponding to containers having a density greater than 0.02 kg/cm3 but less than 0.05 kg/cm3, assign it to conDenBoolean_gt_002 4. Determine which containers have a density greater than 0.01 kg/cm3. 5. Determine the fill weights of the containers with a density greater than 0.01 kg/cm3Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started