Contents  
Functions  
Index
 
 PDF |
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 datasets 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 datasets.
With iiplot, you can use the standard database wrapper XF to change properties as needed then write selected datasets to a file. For example,
tname=nas2up('tempname .uf');
[ci,XF]=iicom('curveload','gartid');
XF(1).x='frequency'; % modify properties, see xfopt('_datatype')
XF(1).yn='accele';
iicom('sub'); % reinitialize plot to check
ufwrite(tname,XF,1);
% write a model
XF(7)=demosdt('demo gartte');ufwrite(tname,XF,7);
% write a time trace
C1=fe_curve('TestRicker .6 2',linspace(0,1.2,120));
XF(8)={'w',C1.X,'xf',C1.Y};
XF(8).x='time'; % see xfopt('_datatype')
XF(8).yn='Acceleration'; % see xfopt('_datatype')
XF(8).fun=[1]; % see xfopt('_funtype')
ufwrite(tname,XF,8);
UFS=ufread(tname); % reread the UFF to check result
Note that you can edit these properties graphically in the iiplot properties ... figure.
See also
©1991-2008 by SDTools