.Modelica_LinearSystems2.TransferFunction.Import.fromFile

Information

Syntax

tf = TransferFunction.Import.fromFile(fileName, numName, denName)

Description

Reads and loads a transfer function from a mat-file fileName. The file must contain the names of the vector with the polynomial coefficients of numerator and denominator

Example

algorithm
  tf:=Modelica_LinearSystems2.TransferFunction.Import.fromFile("tf.mat", "n", "d");
//  tf = (s^2 + 2*s + 3)/(4*s^2 + 5*s + 6)

Interface

encapsulated function fromFile
  import Modelica.Utilities.Streams;
  import Modelica_LinearSystems2.TransferFunction;
  input String fileName = "tf.mat" "Name of the transfer function data file" annotation(
    Dialog(loadSelector(filter = "MAT files (*.mat);; All files (*.*)", caption = "transfer function data file")));
  input String numName = "n" "Name of the numenator of the transfer function";
  input String denName = "d" "Name of the denominator of the transfer function";
  output TransferFunction tf(n = fill(0, ns2), d = fill(0, ds2)) "transfer function";
end fromFile;

Generated at 2024-11-26T19:26:15Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos