필터 지우기
필터 지우기

Load Command on How to Skip Rows

조회 수: 46 (최근 30일)
Chow Tze Liang
Chow Tze Liang 2012년 3월 28일
Hi all, I'm new to matlab and currently using Load function.
I was wondering is it possible to skip a few rows and start to read the columns.
Current code is
file1=m40db5hzPPKA;
vel_x1=file1(:,3);
vel_y1=file1(:,4);
vel_z1=file1(:,5);
Where the raw file is as below:
Time xxxxx
date xxxxx
location xxxx
title xxxxx
1052 72 -7437 14807 -9735
1052 73 -7780 14063 -7890
1052 74 -8217 13731 -6298
1052 75 -8997 14658 -7345
1052 76 -10011 16227 -4948
1052 77 -10539 16862 -430
1052 78 -9684 15008 -2221
To read the file, i need to delete the time, date, location and title row to prevent error...
Is there any script available to skip the few rows as i would like to keep them in my raw file and use it as a reference in future?
Thank you ppls!

채택된 답변

Richard
Richard 2012년 3월 28일
This will then load the data into matlab without the headers. Try it and let me know if you have any difficulties or if you were looking for a different answer.
  댓글 수: 1
Chow Tze Liang
Chow Tze Liang 2012년 6월 8일
Sorry, forget to reply.
Works perfectly! Thks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Use COM Objects in MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by