- Index
- » Programming
- » Modelica Language
- » How to pass one equation from...
Page Start Prev 1 Next End
How to pass one equation from negative to 0?
How to pass one equation from negative to 0?
Jan-28-14 14:12:09
what I want it is very simple, I do not know if exist some sample code that transform one negative equation to 0, for ex:
y=ax+b
if y<0
y=0
else
y=y
end if
but I have a lote of this examples and will be nice if some simple equation like
y(y<0)=0
existe something like this?
Re: How to pass one equation from negative to 0?
Jan-28-14 14:22:46
y=min(ax+b,0)
- sjoelund.se
- 1700 Posts
Re: How to pass one equation from negative to 0?
Jan-28-14 16:38:51
sorry, I meant to write max(ax+b,0)
- sjoelund.se
- 1700 Posts
Page Start Prev 1 Next End
- Index
- » Programming
- » Modelica Language
- » How to pass one equation from...
There are 0 guests and 0 other users also viewing this topic