Results 1 to 3 of 3

Math Help - MATLAB: Loading a file and digits

  1. #1
    Junior Member
    Joined
    Oct 2008
    Posts
    49

    MATLAB: Loading a file and digits

    Hi guys

    I am loading in a file using

    Code:
    load data.dat
    which contains the numbers 1.123, 2.1234, 3.123456.

    Now, how many decimals are stored in the variable data(i,1) where i is {1,3}? And can I vary this amount (I want the maximum amount).

    Best,
    Niles.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Niles_M View Post
    Hi guys

    I am loading in a file using

    Code:
    load data.dat
    which contains the numbers 1.123, 2.1234, 3.123456.

    Now, how many decimals are stored in the variable data(i,1) where i is {1,3}? And can I vary this amount (I want the maximum amount).

    Best,
    Niles.
    What do you get when you type data at the command prompt?

    (you should have an array of doubles so they should have as many figures as in the file)

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    Oct 2008
    Posts
    49
    I just used

    Code:
    format long
    to be on the safe side. Thanks.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Matlab Help: Creating M-File
    Posted in the Math Software Forum
    Replies: 2
    Last Post: March 24th 2010, 08:12 PM
  2. Need help with fsolve in Matlab M file
    Posted in the Math Software Forum
    Replies: 0
    Last Post: June 6th 2009, 03:06 PM
  3. Loading Data in Matlab
    Posted in the Math Software Forum
    Replies: 3
    Last Post: May 7th 2009, 08:06 PM
  4. Matlab M file
    Posted in the Math Software Forum
    Replies: 4
    Last Post: April 18th 2009, 03:34 AM
  5. Matlab: Loading from strings
    Posted in the Math Software Forum
    Replies: 1
    Last Post: April 10th 2008, 11:13 AM

Search Tags


/mathhelpforum @mathhelpforum