• Save
Matlab Text Files
Upcoming SlideShare
Loading in...5
×
 

Matlab Text Files

on

  • 4,535 views

Matlab Text Files

Matlab Text Files

Statistics

Views

Total Views
4,535
Views on SlideShare
4,488
Embed Views
47

Actions

Likes
0
Downloads
0
Comments
0

3 Embeds 47

http://www.dataminingtools.net 31
http://www.slideshare.net 10
http://dataminingtools.net 6

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Matlab Text Files Matlab Text Files Presentation Transcript

    • Matlab: Working with files
    • 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’);
    • 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.
    • Writing files
    • 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+'.
    • 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.
    • Reading Files
    • Reading Files
    • 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.
    • Shifting and Sorting matrices
    • 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