.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-11-23T19:25:52Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos