octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

test needed - fileread and line endings


From: Mike Miller
Subject: test needed - fileread and line endings
Date: Thu, 30 Jun 2016 12:00:35 -0700
User-agent: Mutt/1.6.0 (2016-04-01)

Can someone test the following for me in Matlab? I'm interested in the
output on both Windows and Unix-like systems.

  fid = fopen('foo.txt', 'wb');
  fprintf(fid, 'a\nb\n');
  fclose(fid);
  fid = fopen('bar.txt', 'wb');
  fprintf(fid, 'a\r\nb\r\n');
  fclose(fid);
  info = dir('foo.txt');
  info.bytes
  info = dir('bar.txt');
  info.bytes
  s = fileread('foo.txt');
  double(s)
  s = fileread('bar.txt');
  double(s)

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]