Question: please help me solve this on Matlab grader ,use the same script with the same variables that are already on it and just complete the

please help me solve this on Matlab grader ,use the same script with the same variables that are already on it and just complete the existing script.Don't change the structure of the original ,just work on it and provide the missing answers for matlab grader.Thanks .

made are discarded. Script 8 % load force sensors data \%load( 'forcesensorData.mat', 't', 'v'); n=randi([3050])% Random number of data between 30 to 50 t=(1:1:n) v=1+(2+2)rand(1,n) \% which measurements are faulty. The result should be an array of indices. \% Determine the percentage (a fraction out of one) of measurements that were faulty. call it faulty_percentage faulty_location =[] count =0 faulty_percentage =0 \%Determine boolean vector that indicates the the valid (non-faulty) voltage measurements, create a zeor array of length n. \%Calculate the summation of average of the valid (non-faulty) voltage measurements from the full data, assign the result to average bValid =zeros(1,n) tValid =[] total=0 average =0 count =0 particular force sensor should be positive or zero, so any voltage less than OV is a faulty reading. For this problem, we will generate t and randomly generate the voltage v. Complete the MATLAB program below that will: Use one for loop to do the following two 1. Determine which measurements were faulty. The result should be an array of indices. call it faulty location. See hint. 2. Determine the percentage (a fraction out of one) of measurements that were faulty. call it faulty_percentage Use a while loop to do the following three: 1. Determine boolean vector that indicates the the valid (non-faulty) voltage measurements 2. Extract the corresponding times of valid (non-faulty) voltage measurements from the full data and save them in variables named tvalid, see hint. 3. Calculate the summation of average of the valid (non-faulty) voltage measurements from the full data The program does not need to display any results. For this problem, you can not use the element-by-element operation. You must use loop to solve the problem. Hint: For an example row vector a=[1,2,3,4] a=[a 5 ] or a=[a,5] Assessment: Is faulty_location correct and the for loop is used to calculate the result? No length, siz Is faulty_percentage correct and the for loop is used to calculate the result? No length, Is bValid correct? Used while loop? No length, size, mean, sum function? (Pretest) Is tValid correct? Used while loop? No length, size, mean, sum function? (Pretest) Is average correct? Used while loop? No length, size, mean, sum function? (Pretest)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
