Artifact 7d7c3065b22a6b54cba013880313f5ed8fa3d43419655f6ccfecf85d43a1744c:
- File gino/g2o_pol.m — part of check-in [af3953deae] at 2021-03-01 11:39:42 on branch master — Cleanup repository after cvs2git conversion. (user: jeff@gridfinity.com, size: 585) [annotate] [blame] [check-ins using] [more...]
- File mttroot/gino/g2o_pol.m — part of check-in [51b26b2720] at 2002-12-19 16:48:21 on branch origin/master — Initial files for gino - see README (user: gawthrop@users.sourceforge.net, size: 585) [annotate] [blame] [check-ins using]
function o_pol = g2o_pol (g_pol, object) ## usage: o_pol = g2o_pol (g_pol) ## ## Converts a ginsh polynomial to an octave polynomial ## Both o_pol and g_pol are strings ## o_pol can be an argument to eval if nargin<1 error("usage: o_pol = g2o_pol (g_pol)"); endif if nargin<2 object="s"; endif g_pol = g_expand(g_pol); n = g_degree(g_pol, object); n = eval([n,";"]); o_pol = ""; for i=n:-1:0 pol_i = g_coeff(g_pol,object,int2str(i)); o_pol = sprintf("%s %s", o_pol, pol_i); endfor o_pol = sprintf("[%s ];", o_pol); endfunction