# Octave/MATLAB 'bug' with fileread()

```
data = fileread('in.txt'); data = data(:)';
```

fixes the problem in Matlab of getting vertical columns of text from some ASCII text files from various operating systems, that is, getting one character per line. We wish to have character row vectors, not column vectors generally.

### Example

Assume `in.txt`

contains:

```
Joe 100 eggs
```

and executing:

```
data = fileread('in.txt')
```

gives:

```
J
o
e
1
0
0
e
g
g
s
```

### Fix

```
data = data(:)'
```

gives

```
Joe100eggs
```

** Tags: **
gnu-octave

** Categories: **
matlab

‹»GraphicsMagick compilation options (with Octave)«
»REGEXP to get formatted date out of arbitrary length string«›