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

How to plot y=x function in Modelica

How to plot y=x function in Modelica

What should I add to make this work. I know that this needs one more equation where I need to define the range x maybe ? Any help would be appreciated. Thank you in advance.

model Plot

Real y;
Real x;

equation

y=x;

end Plot;

Re: How to plot y=x function in Modelica

you can use time which is a built in variable,
model Plot

Real y;

equation

y=time;

end Plot;

Re: How to plot y=x function in Modelica

Is there an alternative to using time ? It is very important for me to use two variables independent of time...

Re: How to plot y=x function in Modelica

If you are using OMEdit, you can just click the "New Parametric plot" button and it will open a plot where you can select any two variables to plot against each other.

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