writeascii

Saves vector, matrix (up to 3 dimensions) ...
3.3K Downloads
Updated 3 Apr 2006

No License

Easy function to write ASCII files

USAGE:
show = writeascii(outfile,data,dataformat,outperm)

DESCRIPTION:
Saves vector, matrix (up to 3 dimensions), string,
or cell array data into an ASCII file.

INPUT VARIABLES:
outfile = Name of out-file
default 'data.asc'
data = Vector, matrix (up to 3 dimensions), string,
or cell array data
dataformat = format used for all columns of numeric data
e.g. '%5.6f ', ' %2g\t'
default is calculated using the highest decimal or
used in each column of data or 8 which ever is lower
if the data is a string, '%s' is used as the format
or delimiter to be used between columns
e.g. ' ', '\t'
default '\t' %tab, helps makes it easier to import to excel
outperm = Permision for out-file used with fopen
e.g. 'a', 'w+'
default 'w'

OUTPUT VARIABLES:
show = string saying the name of the out-file and
where it was saved

VALID INPUT FORMATS:
writeascii(data)
writeascii(outfile,data)
writeascii(outfile,data,dataformat)
writeascii(outfile,data,dataformat,outperm)

Cite As

Alex Sanchez (2024). writeascii (https://www.mathworks.com/matlabcentral/fileexchange/4138-writeascii), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0

update