Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Function not found in the scope of a model

Function not found in the scope of a model

Hello,
My simple Modelica code is as follows and received the error: Function Vectors.interpolate not found in scope interpo.

Code:

model interpo

  import Modelica.SIunits.{Temperature, Length};
  import Modelica.Math.Vectors.interpolate;
  parameter Temperature thetas[5] = {45, 46, 54, 48, 51};
  parameter Length barycenters[5] ={2, 4, 6, 8, 10};
  parameter Length x_sens[3] = {3,5,7};
  Temperature thetas_sens[3];

equation
thetas_sens = Vectors.interpolate(barycenters, thetas, x_sens);

end interpo;

I would appreciate if you could help.

Re: Function not found in the scope of a model

The equation should be thetas_sens = interpolate(barycenters, thetas, x_sens) since I have already imported the package Vectors.

There are 0 guests and 0 other users also viewing this topic
You are here: