help-octave
[Top][All Lists]
Advanced

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

Re: inconsistent results between textread and load


From: James Sherman Jr.
Subject: Re: inconsistent results between textread and load
Date: Tue, 18 Nov 2014 11:58:56 -0500

On Tue, Nov 18, 2014 at 8:15 AM, kamaraju kusumanchi
<address@hidden> wrote:
> On Sun, Nov 16, 2014 at 6:43 AM, Philip Nienhuis
> <address@hidden> wrote:
>> kamaraju wrote
>>> It looks like the same data file is read in different ways by textread
>>> and load. Is this intentional? If not, can we make the default
>>> behaviour consistent?
>>
>> Forgot to answer those questions (sorry):
>>
>> - Yes, it is intentional
>>
>> - No, load and textread serve different purposes; as a consequence they
>> yield different output, dependent on the case at hand (as I mentioned in my
>> other thread post).
>
> Thanks for the explanation.
>
>> Why do you want them to behave "consistent" (whatever it is you exactly mean
>> by that) ? (just curious, and maybe we can help you further)
>
> It is not that important. Whenever I want to read a text/data file, it
> becomes a trial and error excercise to figure out the correct routine
> that does the job. Instead, I feel like there should be some kind of
> uniformity across functions that handle input.
>
> I also agree that not a single function can do all the heavy lifting
> of importing data, so for now I will just remember what works when and
> how.
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-octave

It is my understanding that "load" is meant to be used in conjunction
with "save" and is meant to work with the ".mat" file structure.  So,
using "load" with other file structures can lead to unintended
results.  My general rule of thumb: if I created a file (or knew it
was created) with "save" then use "load", otherwise I use textread or
fscanf to read in the file and then do any pre-processing on the data
to get it into a format I can use.

Hope this helps,

James Sherman



reply via email to

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