help-octave
[Top][All Lists]
Advanced

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

Re: csvread


From: Mike Miller
Subject: Re: csvread
Date: Tue, 5 Apr 2016 07:18:26 -0700
User-agent: Mutt/1.5.24 (2015-08-30)

On Tue, Apr 05, 2016 at 16:01:34 +0200, Jonathan Camilleri wrote:
> I think I am missing something as I try to read a CSV file to a matrix of
> some sort.
> 
> >> addpath('C:\Users\slyth_000\Downloads\temp\M.Sc\data-sets\eurofxref')
> >> x = csvread('eurofxref.csv')
> error: dlmread: unable to open file 'eurofxref.csv'

Yes, you have asked about this before (with pkg, but the same insight
applies to both). The addpath function does not help you in this case.

Try either cd() to the directory where the file is or use the full file
name. To be clear, either of these should work:

  cd('C:\Users\slyth_000\Downloads\temp\M.Sc\data-sets\eurofxref')
  x = csvread ('eurofxref.csv')

or

  dir = 'C:\Users\slyth_000\Downloads\temp\M.Sc\data-sets\eurofxref';
  x = csvread (fullfile (dir, 'eurofxref.csv'))

-- 
mike



reply via email to

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