https://github.com/janverschelde/PHCpack
Raw File
Tip revision: e90f79836eff27ef5ec64e08221c6afecbbcebfe authored by janv@uic.edu on 03 June 2016, 22:44:35 UTC
prepared version 0.4.8 of phcpy
Tip revision: e90f798
write_cassys.m
function write_cassys(filename,system)
%
% write_cassys(filename,system)
% A utility function special for cascade algorithm.
% The 1st row of written polynomial system only contains number of poly.
% Assuming the system is square.
% INPUT:
% filename =  file name
% system   =  polynomial system in tableau or cell array format
%             see help solve_system for details
%
sysf_npoly = size(system,1);
sysf = system;

id = fopen(filename,'wt');
temps = [num2str(sysf_npoly) '\n']; 
fprintf(id, temps);
clear temps;
for k=1:size(sysf,1)
    fprintf(id, ' ');
    fprintf(id, sysf{k,1});
    fprintf(id, ';\n');
end
fclose(id);
back to top