.Modelica_LinearSystems2.ZerosAndPoles.Import.fromFile

Information

Syntax

zp = ZerosAndPoles.Import.fromFile(fileName)

Description

Reads and loads a zeros-and-poles transfer function from a mat-file fileName. The file must contain 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 gail in both cases.

Example

algorithm
  zp:=Modelica_LinearSystems2.ZerosAndPoles.Import.fromFile("zp.mat", "n", "d");
//  zp = (p^2 + 2*p + 3)/(p + 2)/(p^2 + 2*p + 2)

Interface

encapsulated function fromFile
  import Modelica;
  import Modelica_LinearSystems2.ZerosAndPoles;
  import Modelica_LinearSystems2;
  import Modelica_LinearSystems2.Math.Complex;
  import Modelica_LinearSystems2.DataDir;
  input String fileName = DataDir + "zp.mat" "Name of the zeros and poles data file" annotation(
    Dialog(loadSelector(filter = "MAT files (*.mat);; All files (*.*)", caption = "state space system data file")));
  output ZerosAndPoles zp(n1 = fill(0, n1), n2 = fill(0, n2, 2), d1 = fill(0, d1), d2 = fill(0, d2, 2));
end fromFile;

Generated at 2024-04-24T18:15:52Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos