Home / Week 4 Exercises / poles_to_sf

poles_to_sf

You are not logged in.

If you are a current student, please Log In for full access to this page.
A Python Error Occurred:

Error on line 29 of Python tag (line 30 of source):
    from lib601.sf import SystemFunctional

ModuleNotFoundError: No module named 'lib601'

If you're going to SF

Define a function called poles_to_sf, which takes as its lone argument a list of numbers representing the poles of a system, and returns an instance of System representing a system with those poles.

The numerator of the returned system functional should always be 1.

In the box below, the Polynomial class, as well as all of the classes from our previous exercises in developing a framework for modeling LTI systems (System, Gain, R, etc.) have been imported for you. To debug on your own machine, add the following to the top of your work file:

from lib601.poly import Polynomial
from lib601.lti import *

It might be helpful to refresh your memory of the lti and poly modules by looking at the lib601 documentation.

Enter your definition for poles_to_sf in the box below:

A Python Error Occurred:

Error on line 28 of question tag.
    {'code':'s = poles_to_sf(%r)\nans = (s.numerator.coeffs, s.denominator.coeffs)' % [cs_random.randint(3,9)],'check_function':check_sf, 'include':True, 'include_soln':True},

NameError: name 'check_sf' is not defined