save4spss
No License
save4spss()opens dialogue boxes to select a matrix,a cell array with variable names (optional),and specify a file name to save the matrix the SPSS syntax gets the same name.
save4spss(DATA,VARNAMES,FILE) saves the matrix DATA in the file given in FILE and creates a SPSS syntax file FILE.sps to import these data in SPSS .Variables (data columns) are named according to the elements of cell array VARNAMES.
After running save4spss, just open the generated SPSS syntax in SPSS and run it. Also see help save4spss
example:
mystudy=[1 30 10000; 2 35 15000];
varnames={'subject';'age';'income'}
save4spss(mystudy,varnames,'mystudy.dat')
creates an ASCII file mystudy.dat and a SPSS syntax mystudy.sps.
If you run this syntax in SPSS the data are imported, the variables named and the file is saved as mystudy.sav
Cite As
Robert Schleicher (2024). save4spss (https://www.mathworks.com/matlabcentral/fileexchange/8659-save4spss), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 | summary sentence incomplete |