swh:1:snp:8806d9cb20ec953d50256cbaa431794688d67a2f
Raw File
Tip revision: ccbc2cb1fcfa7f8ca7e2c476c5fdaae1e817d322 authored by Jan Verschelde on 27 September 2018, 20:43:56 UTC
prepared files for version 0.8.7 of phcpy
Tip revision: ccbc2cb
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