Write a script which takes the frequency, amplitude and type(sinusoidal, square or triangular) of a function as input from userand plots the function y(t) at output. Hint: In MATLAB, you can generate a sinusoidal function by using“sin”, a square function by using “square” and a triangularfunction by using “sawtooth” functions. User-inputs Select any frequency within the interval F ∈ [1kHZ,100kHZ], select the amplitude of the signal “VM” and define thetime vector “t” in the interval t ∈ [ 0, 10/F] with an increment of0.001/F and type of the signal such as ‘sin’, ‘square’ and‘triangular’. a. (5 pts.) Draw a flowchart and explain your problem solvingstrategy. b. (12 Pts.) Take values of frequency, amplitude, and type fromthe user. c. (4 Pts.) Define vector t. d. (10 Pts.) Use a switch-case condition for different types ofdesired output function (different cases.) Within each case,calculate the output vector y. You may use either a loop or vectoroperation in this stage. e. (9 Pts.) Plot your output vector y versus time vector t. Putlabels, title and legend to your figure. (This is a full of questiong it can be resolvable withMATLAB(MATHWORKS QUESTİON) . . .
#Sales Offer!| Get upto 25% Off: