SDT-base Contents   Functions      PDF Index |
Purpose
Write to a Universal File.
Syntax
ufwrite(FileName,UFS,i) ufwrite(FileName,model)
Description
You can export to UFF using the feplot and iiplot export menus.
ufwrite(FileName,UFS,i) appends the dataset i from a curve stack UFS to the file FileName. For details on curve stacks see section 2.1.2. ufwrite(FileName,model) can be used to export FEM models.
For data-sets representing
Starting from scratch, you define an curve stack DB=xfopt('empty'). You can then copy data sets from the stack XF (previously initialized by iiplot or xfopt) using DB(i)=XF(j). You can also build a new data set by giving its fields (see xfopt for the fields for the three supported dataset types). The following would be a typical example
UF=xfopt('empty') UF(1)={'node',FEnode,'elt',FEelt}; UF(2)={'w',IIw,'xf',IIxf}; UF(3)={'po',IIres,'res',IIres,'dof',XFdof};
Once the curve stack built, ufwrite('NewFile',UF,1:3) will write the three dataset.
With iiplot, you can use the stack to change properties as needed then write selected dataset to a file. For example,
tname=nas2up('tempname .uf'); ci=iicom('CurveLoad','gartid'); ci.Stack{'Test'}.x='frequency'; % modify properties, see xfopt('_datatype') ci.Stack{'Test'}.yn='accele'; iicom('sub'); % reinitialize plot to check ufwrite(tname,ci,'Test'); % write a model ci.Stack{'SE','model'}=demosdt('demo GartDataTest'); ufwrite(tname,ci,'model'); % write a time trace C1=fe_curve('TestRicker .6 2',linspace(0,1.2,120)); C1=ufwrite('_toxf',C1); % Transform to xf format C1.x= xfopt('_datatype','time'); % xfopt('_datatype') give the list of avalaible datatype C1.yn= xfopt('_datatype','Acceleration'); C1.fun= xfopt('_funtype',1); % xfopt('_funtype') give the list of avalaible funtype ci.Stack{'curve','Ricker'}=C1; ufwrite(tname,ci,'Ricker'); UFS=ufread(tname); % reread the UFF to check result
Note that you can edit these properties graphically in the iiplot properties ... figure.
See also