Question: matlab Question-1: Write a program (create .m file) to a) Get 4 vectors of 5 elements each, from the user b) Use 'diag' to create

matlab
Question-1: Write a program (create .m file) to a) Get 4 vectors of 5 elements each, from the user b) Use 'diag' to create a matrix with elements of 1 stvector on its main diagonal c) Replace the last element of the 3rd vector with zero d) Create an the square of each element in the 2nd vector f) Find the lowest of ones that is the same size of existing 1n vector. g) Find the lowest element in 1g vector h) find all the element of the lowest element in 1st vector vector ever than the corresponding elements in 2nd j) Calculate the vector with 5 Selements in it and multiply it with 1st vector. k) Get a new (4xing, ceiling, fix and floor of the existing random vector existing diagonal matrix 1) Calculate the to the result. Make sure to display all your results with strings. Question-2: 1km is equivalent to 1000m. Write a script that prompts the user for the number of km, calls a function to return the equivalent amount of meters, and prints this result. Write the function, as Question-3: Write a Matlab program to get two signals from the user and compare them. Determine the index where a sample of first signal has larger amplitude as compared to the corresponding sample of second signal. Use for loop. Also plot the original signals as well as the resultant signal Question-4: Determine the complex conjugate of the user generated exponential signal. Plot its magnitude, phase, the real part, and the imaginary part in separate subplots
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
