help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Importing Data with Text Column Headers


From: Nicholas Jankowski
Subject: Re: Importing Data with Text Column Headers
Date: Wed, 18 Nov 2015 21:19:42 -0500


On Nov 18, 2015 7:55 PM, "jegg17" <address@hidden> wrote:
>
> I am attempting to import data including the text column headers and have
> tried  "dlmread" and "importdata" in various ways but am still struggling to
> import my data appropriately. My current attempt was:
> filename=indirectory1
> delimiterIn='\t';
> headerlinesIn=size(indirectory1,2)
> td_ank5=importdata(indirectory1,delimiterIn,headerlinesIn);
>
> Which gives me a 103x1 matrix, when the text file is actually 103x40. I'm
> relatively new to programming so I've tried much of what I've found via
> google. Any help would be greatly appreciated!
>

I assume 'indirectory1' is a string with the filename  you've defined elsewhere?  What do you expect to get from size(indirectory1,2) ?  That should just give you the number of characters in that string. Don't think that will do anything to tell you how many header lines are in the data . if that number is too big, it would explain why the function is skipping most of your data.

Nick j.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]