- Index
- » Users
- » Vadim
- » Profile
Posts
Posts
Page Start Prev 1 Next End
Jul-01-10 10:56:57
Topic:
Vector/Matrix operation
Vector/Matrix operation, algorithm section
Category:
Usage and Applications
Thanks for the answer. I hope a problem in due course it will be resolved.
Jun-30-10 14:03:48
Topic:
Vector/Matrix operation
Vector/Matrix operation, algorithm section
Category:
Usage and Applications
Hello,
I am a new openmodelica user.
I try to write vector/matrix operations in algorithm section.
For example:
Code:
class mvmul
Real res[3];
Real m[3,3]={{1,0,0},{0,0.5,0},{0,0,1}};
Real v[3]={1,1,1};
algorithm
res:=m*v;
end mvmul;
After "Check":
Code:
Class mvmul has 13 equation(s) and 15 variable(s). 12 of these are trivial equations.
After "Simulate" :
Code:
{"",""}
"Error: Too few equations, underdetermined system. The model has 1 equation(s) and 3 variable(s)
"
Result of 'm*v' has dimension [3] and res[3]. But system interpreted 'm*v' dimension as [1].
what is wrong in my code?
Thank you.
Page Start Prev 1 Next End
- Index
- » Users
- » Vadim
- » Profile