How to select particular column from csv file using csvread function in Matlab

1 次查看(过去 30 天)
Hi Friends,
In my working place we are using Matlab student version 1999. As a work purpose I need to extract few columns of data from large csv file. So far our implementation was writing %f or %*f for all columns depending on number of columns we want.But it is cumbersome task to write so lengthy line. I have seen xlsread function to read particular column from csv file in new matlab version. But since we are using student version I am unable to get this feature. Also I have gone through csvread(filename,R1,C1,[R1,C1,R2,C2))feature of csvread but could not make success to read desired columns.
%My input is 'Navdata.csv'
Time .......missing columns not required.. Latitude(30th column) Longitude Altitude
1234 0.3567 0.4678 356
.... ..... ...... .... ...
% Using xlsread
extract_data=xlsread('Navdata.csv','Navdata','A:A')
% How can I achieve the same without reading all columns and just to extract 4 columns using csvread fucntion.
Thanks

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by