www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@xregbdrydev/exporttofile.m
function [ok, err] = exporttofile( bdev, file ) %EXPORTTOFILE Export constraint to file % % [OK, ERR] = EXPORTTOFILE(BDEV, NAME) % Copyright 2000-2008 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin < 2 || isempty( file ), err = 'No filename specified'; ok = 0; return end con = getconstraint( bdev ); %%M = xregStatsModel( con, 'constraint' ); try save( file, 'con', '-mat' ); ok = 1; err = ''; catch ME err = ['Unable to save to file: ' file '. ' ME.message ]; ok = 0; end