Reputation: 791
I'm using MATLAB under Windows, and trying to display (dump) the contents of a text file in the command shell. It seems like overkill to open a small file in the editor, or to load the file to use disp.
disp
Upvotes: 1
Views: 1694
Reputation: 25140
As well as type, there's also dbtype which lets you pick a start and end range to print, and shows line numbers - handy for listing source files.
type
dbtype
Upvotes: 0
Reputation: 32930
Use type and specify the explicit file name (including the extension), for instance:
type('myfile.txt')
Upvotes: 6