Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please show me command on the script or better if it is screen shot Question 4:

ID: 2962656 • Letter: P

Question

Please show me command on the script or better if it is screen shot

Question 4: In dealing with long list of numbers (such as might be used in a digital representation of music or pictures) it is often useful to employ a thresholding operation. This sets to zero any element of the list which is below a specified numerical value (the threshold). This technique is useful for, among other things, removing noise from the sound or image. Write a Matlab function called thresh which has two inputs, an array of numbers x, and a scalar t representing the threshold level. The function should also have two outputs: an array y and a number n. The elements of the output array y should be the same as those in x, except that for every element of x whose absolute value is smaller than t, the corresponding element of y should instead be set to 0 (this is the thresholding step). Finally, the output number n should be the number of elements in y which were set equal to zero by the thresholding operation.

Explanation / Answer

function [y,n] = thresh(x,t) n=sum(x
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote