Post Reply 
Probs solving sys. of eqs. programatically.
10-26-2018, 05:52 AM (This post was last modified: 10-26-2018 06:07 AM by sasa.)
Post: #2
RE: Probs solving sys. of eqs. programatically.
Perhaps it is more convenient to work directly with objects.

For instance:
Code:

#cas
SZ_T1(eq_list)
begin

  local n:= size(eq_list);
  local i, eq; 

  print ("");
  print ("There is " + n + " objects");

  for i from 1 to n do
    eq:= eq_list[i];    
    print (i + ": " + eq);    
  end;
   
end;
#end

#cas
SZ_T2(eq_list, var_list)
begin
  local n:= size(eq_list);
  local i, eq; 

  print ("");
  print ("There is " + n + " objects");

  for i from 1 to n do
    eq:= eq_list[i];    
    print (i + ": " + eq);    
  end;

  print(" ");
  print("Var list: ")
  print(var_list);

  print(" ");
  print("Solution: ");
  print(solve(eq_list,var_list));
 
end;
#end

Examples:

SZ_T1( (2*x+3*y)=1, (x+y) = 2 )
SZ_T2([(2*x+3*y) = 1,(x+y) = 2],[x,y])
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Probs solving sys. of eqs. programatically. - sasa - 10-26-2018 05:52 AM



User(s) browsing this thread: 2 Guest(s)