functionfromFile
Generate a DiscreteZerosAndPoles data record by reading the polynomial coefficients or zeros and poles from a file
Information
Syntax
dzp = DiscreteZerosAndPoles.Import.fromFile(fileName)
Description
Reads and loads a discrete zeros-and-poles transfer function from a mat-file fileName. The file must contain the sample time Ts and either the set of variables n1, n2, d1, d2, and k with the associated first and second order polynomials or the variables p, z, and k with the poles and zeros, written in two column arrays with real and imaginary in the first and second column respectively. The variable k is the real gain in both cases.
Example
algorithm dzp:=Modelica_LinearSystems2.DiscreteZerosAndPoles.Import.fromFile(DataDir + "/dzp.mat"); // zp = (q^2 + 2*q + 3)/(q + 2)/(q^2 + 2*q + 2)
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | fileName | DataDir + "dzp.mat" | Name of the discrete zeros and poles data file |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| DiscreteZerosAndPoles | dzp |