Post Reply 
1-AUG-2019 SolveSys - Equation Library and Nonlinear Systems Solver
02-14-2017, 02:11 AM
Post: #16
RE: SolveSys - Equation Library and Multiple Equations Solver
Here is another utility that will take your library data and convert it into a note, which you can then export into a text file. It assumes your library data has be converted up to the version used in 0.651

Code:
EXPORT LibToNote()
BEGIN
  local note:="EqLib.txt";
  local lib:=AFiles("Equation Library.lib");
  local n:=size(lib);
  local sys, m, j, k, r;
  local indent;

  Notes(note):="{\n";
  for j from 1 to n do
    Notes(note):=Notes(note) + "  {\n";
    sys:=lib(j);
    for k from 1 to 8 do
      Notes(note):=Notes(note) + "    ";
      if (k == 2) or (k == 5) then
        Notes(note):=Notes(note) + "{\n";
        for r from 1 to (size(sys(k))-1) do
          Notes(note):=Notes(note) + "      ";
          Notes(note):=Notes(note) + string(sys(k,r)) + ",\n";
        end;
        Notes(note):=Notes(note) + "      ";
        Notes(note):=Notes(note) + string(sys(k,r)) + "\n    }";
      else
        Notes(note):=Notes(note) + string(sys(k));
      end;
      if (k < 8) then Notes(note):=Notes(note) + ","; end;
      Notes(note):=Notes(note) + "\n";
    end;
    Notes(note):=Notes(note) + "  }";
    if (j < n) then Notes(note):=Notes(note) + ",\n"; end;
    Notes(note):=Notes(note) + "\n";
  end;
  Notes(note):=Notes(note) + "}"; 
END;

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: SolveSys - Equation Library and Multiple Equations Solver - Han - 02-14-2017 02:11 AM
Not able to solve a system - rrpalma - 05-05-2019, 08:10 PM



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