[fname, pname] = uigetfile('*.csv'); %ask for file
filename= fullfile(pname, fname); %file as string
assert(exist(filename, 'file')==2,'%s does not exist.', filename); %check if file exist
data = csvread(filename, 1) % reads data from file skipping headers
***************************Excel Data***************(just need to shift values to according heading, they are in order)(there are like 55,000 rows but these are the first couple)Latitude Longitude Elevation (metres) Distance (KMs) Gradient30.6183 -96.33631 103.7 0 030.61832 -96.33629 103.6 0.003 030.61845 -96.3361 102.8 0.026 030.61845 -96.33608 102.7 0.028 0**************************Data from Matlab************************0.0363 -0.1203 0.1592 2.7105 0 0.0363 -0.1203 0.1595 2.7105 0 0.0363 -0.1203 0.1595 2.7106 0 0.0363 -0.1203 0.1578 2.7106 -0.0010 0.0363 -0.1203 0.1571 2.7107 -0.0020
MATLAB: Matlab takes in wrong data in command window
.csv fileincorrect data
Best Answer