- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » is it possible to put in a loop"for"...
Page Start Prev 1 Next End
is it possible to put in a loop"for" an equation and an algorithm?
is it possible to put in a loop"for" an equation and an algorithm?
Jul-29-10 14:45:07
Hello there,
I need to write an equation and an algorithm (to assign a value to a variable) inside a for loop
is that possible?
for example something like that
for i: in 2: N loop
equation
der(s(i))=s(i)+a;
algorithm
a:=a+s;
end for;
I don't know when I try to compile itwhy I have some errors on the tags algorithm and end for.
Any suggestion?
Re: is it possible to put in a loop"for" an equation and an algorithm?
Jul-29-10 14:48:56
No, it is not possible to put an equation or algorithm section within the statements of a for-loop. The code won't even parse, which means the error messages will be really weird.
- sjoelund.se
- 1700 Posts
Page Start Prev 1 Next End
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » is it possible to put in a loop"for"...
There are 0 guests and 0 other users also viewing this topic