How to create and read ini file?

Discussion in 'MATLAB' started by karrilyn, Jan 26, 2004.

  1. karrilyn

    karrilyn Guest

    Hi,

    I have problem finding help in the matlab help. It's a simple problem
    and I hope someone can help me thanx!

    I want to save certain matrices, say X and Y, into a text file so
    that in the future I can read from it in other m files.

    So how do i create a ini file with headers say [x] and [y]?

    Then how do i read from the ini file with headers [x] and [y]?

    I know there are functions like dlmwrite and dlmread. I would think
    that I am able to write using dlmwrite. I would have problem reading
    from the file using dlmread as I would not know the size of the
    matrix if i were to write all the matrices into one file.

    Thank you!! =p

    karrilyn
     
    karrilyn, Jan 26, 2004
    #1
    1. Advertisements

  2. karrilyn

    us Guest

    that in the future I can read from it in other m files.

    a couple of hints:
    1) see:
    help diary
    2) copy/paste from the command window into a text file with extension
    <.m>
    3) others will have better ideas.

    us
     
    us, Jan 26, 2004
    #2
    1. Advertisements

  3. karrilyn

    Stefan Stoll Guest

    karrilyn wrote
    Go to
    http://www.mathworks.com/matlabcentral/fileexchange/
    and search for "inifile".
     
    Stefan Stoll, Jan 26, 2004
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.