Question

3. Write a Matlab program that returns the n roots of a complex number. The function should have z and n as inputs a nd retur

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
3. Write a Matlab program that returns the n roots of a complex number. The function should have ...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • (Matlab) Suppose we have a function “hw5f.m” that takes as input x and outputs the value for a function f(x). Write a Matlab program that inputs: • interval [a, b]; • m, the number of data points wit...

    (Matlab) Suppose we have a function “hw5f.m” that takes as input x and outputs the value for a function f(x). Write a Matlab program that inputs: • interval [a, b]; • m, the number of data points with evenly spaced nodes from x1 = a to xm = b, and values from f(x); • location z satisfying x2 < z < xm−1, where h = (b − a)/(m − 1); and outputs the value of the interpolaton polynomial using only...

  • 3. Use the bisection MATLAB program to estimate the roots of the function k(x) = x2...

    3. Use the bisection MATLAB program to estimate the roots of the function k(x) = x2 - 4, where x's range is [-1, 3). Include solutions for this method in the report. 4. Write a MATLAB program that uses the false-position method to estimate the roots of the function k(x) in problem#3. Include your m-file and solutions for this method in the report. In addition, submit your m-file separately.

  • 1) a) Write MATLAB function that accepts a positive integer parameter n and returns a vector...

    1) a) Write MATLAB function that accepts a positive integer parameter n and returns a vector containing the values of the integral (A) for n= 1,2,3,..., n. The function must use the relation (B) and the value of y(1). Your function must preallocate the array that it returns. Use for loop when writing your code. b) Write MATLAB script that uses your function to calculate the values of the integral (A) using the recurrence relation (B), y(n) for n=1,2,... 19...

  • #6 Write a Matlab program that finds numerically all the roots (or the zeros) of the...

    #6 Write a Matlab program that finds numerically all the roots (or the zeros) of the algebraic equation below in the interval 1.0 <=x<=3.0: sqrt(log(x^2+1))=x^2*sin(e^x)+2 Part a) Prompt the user to enter a positive integer number n, defined the range 2<=n<=15, and then verify if the number entered lies within the specifications. Your program must allow the user to reenter the number without the need to rerun the program. Part b) Create a user-defined function for the bisection method(see details...

  • Using matlab and if/else statement please! Write a function that determines the real roots of a...

    Using matlab and if/else statement please! Write a function that determines the real roots of a quadratic equation ax2 + bx + c = 0. To calculate the roots of the equation, the function calculates the discriminant D, given by: D = b2-4ac If D> 0, the code should display "The equation has two roots" and print the values on a new line. If D 0, the code should display "The equation has one root.", and print the value on...

  • Questions: 1. Write a MATLAB program to find all the roots of a given, twice continuously differe...

    Questions: 1. Write a MATLAB program to find all the roots of a given, twice continuously differentiable, function f E C2[a, b]. Your program should first probe the function f(x) on the given interval to find out where it changes sign. (Thus, the program has, in addition to f itself, four other input arguments: a, b, the number nprobe of equidistant values between a and b at which f is probed, and a tolerance tol.) For each subinterval [ai,b] over...

  • write a matlab code Write a MATLAB function to check the stability of a digital filter...

    write a matlab code Write a MATLAB function to check the stability of a digital filter described by its coefficients. Syntax: stable (b, a); where b and a are the system's forward and backward coefficient. Hint: The roots() function might be useful. Returned value: None. Operation: Displays either 'Stable' or 'Not Stable' message and plots the z-plane. Test with Case#1: y(n)= 2x (n) +x (n-1) +0.4y (n-1) - 0.6y (n-2) Case#2: y(n)= x(n) +0.5x (n-1) +2x (n-2)- y(n-1) +y (n-2)...

  • 13. Write a MATLAB program to find all the roots of a given, twice continuously differentiable,...

    13. Write a MATLAB program to find all the roots of a given, twice continuously differentiable, function f e C2la,b]. on the given interval to find out where it Your program should first probe the function f(x) changes sign. (Thus, the program has, in addition to f itself, four other input arguments: a, b, the number nprobe of equidistant values between a and b at which f is probed, and a tolerance tol.) For each subinterval [a,b;] over which the...

  • 1. Write a MATLAB function that takes a matrix, a row number and a scalar as...

    1. Write a MATLAB function that takes a matrix, a row number and a scalar as arguments and multiplies each element of the row of the matrix by the scalar returning the updated matrix. 2. Write a MATLAB function that takes a matrix, two row numbers and a scalar as arguments and returns a matrix with a linear combination of the rows. For example, if the rows passed to the function were i and j and the scalar was m,...

  • Write a Matlab function uni_rand that takes in two parameters a,b and returns a random number...

    Write a Matlab function uni_rand that takes in two parameters a,b and returns a random number between a and b. The distribution of that number should be uniform ( all numbers between a and b equally likely )

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT