Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function call, first argument is an array #10

Open
thorade opened this issue Oct 21, 2015 · 0 comments
Open

function call, first argument is an array #10

thorade opened this issue Oct 21, 2015 · 0 comments

Comments

@thorade
Copy link

thorade commented Oct 21, 2015

See this Lightshow example:
http://bit.ly/1LEnEHJ
or just the code below:

within ;
model SurfaceToAir "cool model"
  Modelica.Electrical.Analog.Basic.Resistor inRes[3,3];
  Modelica.Electrical.Analog.Basic.Resistor outRes[3,3];

equation 
  for j in 1:3 loop
    for k in 1:3 loop
      if inRes[j,k].R > 0 then
        outRes[j,k].R = Modelica.Math.cos(inRes[j,k].R - inRes[k,j].R);
      elseif inRes[j, k].R > 2 then
        outRes[j,k].R = Modelica.Math.cos( inRes[j,k].R - inRes[k,j].R);
      elseif inRes[j, k].R > 3 then
        outRes[j,k].R = Modelica.Math.sin(inRes[j, k].R - inRes[k,j].R);
      else
        outRes[j,k].R = 0;
      end if;
    end for;
  end for;
  annotation (uses(Modelica(version="3.2.1")));
end SurfaceToAir;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant