MATLAB Answers

How do I get Matlab to recognise a text file as numerical values when importing it ?

1 view (last 30 days)
Lavinia Trifoi
Lavinia Trifoi on 8 Nov 2016
Answered: Walter Roberson on 8 Nov 2016
I need to input all the data from this file into Matlab but have it recognize the txt as numerical values. I struggling on how to do that.
The file is at this link:

  0 Comments

Sign in to comment.

Answers (2)


Walter Roberson
Walter Roberson on 8 Nov 2016
%load a copy of the file locally
url = 'https://coastwatch.glerl.noaa.gov/statistic/ice/dat/g2011_2012_ice.dat'
tfile = [tempname '.dat'];
urlwrite(url, tfile);
%read it in
data = readtable(tfile);

  0 Comments

Sign in to comment.

Sign in to answer this question.


Translated by