Using Matlab: EE 221 Computing for Engineers Homework #14 Problem #1 (30 points)
ID: 3349493 • Letter: U
Question
Using Matlab:
EE 221 Computing for Engineers Homework #14 Problem #1 (30 points): Let the mathematical function f(x) be defined as: f(x)exp4x) sin(20x) Write a script in Matlab that finds the brackets (subintervals) where all the zero crossings are occurring and the number of zeros (n), over the interval from [0,1] where the subinterval size is 0.001. Submit the script as a·m file. ( Note: Script is a list of commands which is different from functions) Hint: Initialize the following variables within your script then follow a similar code as the one presented in the lecture. Xmin = 0; Xmax 1 Interval 0.001; n-0 You may plot the function to provide you with a visualization of the zero locationsExplanation / Answer
We can use a simple inbuit command from the matlab
zcdOut = zcd(input)
function will look like this
% zeroCrossFind.m
xmin =0;
xmax =1;
interval = .001;
x_axis=[xmin:interval:xmax];
y_axis= exp(-x).*sin(20.*x);
zcdOut = zcd(y_axis); % finding out the zero crossing
number_zeroCRossing = length(zcdOut) % finding the length
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.