Your SlideShare is downloading. ×
  • Like
  • Save
Matlab Text Files
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Matlab Text Files

  • 3,250 views
Published

Matlab Text Files

Matlab Text Files

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,250
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Matlab: Working with files
  • 2. Writing files
    To write a new file, use the function:
    fid= fopen(‘<filename>’, ‘wt’);
    To write to a new file, use the function:
    fprintf(fid, ‘Hello, I am writing this into the file’);
  • 3. Writing files
    Use the following set of commands to create a new file and write a sentence into that file. View the file in notepad.
  • 4. Writing files
  • 5. Writing files
    To open a file in text mode, specify the permission using one of the listed Permission Value, and attach the letter 't'. For example, use 'rt' or 'wt+'.
  • 6. Reading Files
    Use the command ‘fopen(‘<filename>, rt’) to open a file to be read in text mode.
    Use the fscanf(fid, format, size)command to read form the file.
  • 7. Reading Files
  • 8. Reading Files
  • 9. Shifting and Sorting matrices
    Shift and Sort Functions
    circshift Circularly shift matrix contents.
    sortSort array elements in ascending or descending order.
    sortrows Sort rows in ascending order.
    issorted Determine if matrix elements are in sorted order.
  • 10. Shifting and Sorting matrices
  • 11. Visit more self help tutorials
    Pick a tutorial of your choice and browse through it at your own pace.
    The tutorials section is free, self-guiding and will not involve any additional support.
    Visit us at www.dataminingtools.net