.Modelica_LinearSystems2.Examples.TransferFunction.importFromFile

Information

Example how to read a transfer function from a matlab file

Interface

function importFromFile
  extends Modelica.Icons.Function;
  import Modelica_LinearSystems2.TransferFunction;
  import Modelica_LinearSystems2.Math.Polynomial;
  input Boolean systemOnFile = true "True, if state space system is defined on file" annotation(
    Dialog(group = "system data definition"),
    choices(checkBox = true));
  input String fileName = DataDir + "tf_siso_1.mat" "File where numenator n and denominator d are stored" annotation(
    Dialog(group = "system data definition", loadSelector(filter = "MAT files (*.mat);; All files (*.*)", caption = "transfer function data file"), enable = systemOnFile));
  input Polynomial n = Polynomial({1, 2, 3}) annotation(
    Dialog(group = "coefficients", enable = not systemOnFile));
  input Polynomial d = Polynomial({4, 5, 6}) annotation(
    Dialog(group = "coefficients", enable = not systemOnFile));
  output Boolean ok;
end importFromFile;

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