필터 지우기
필터 지우기

Csv read and figure generation

조회 수: 1 (최근 30일)
Mohammed Cha
Mohammed Cha 2020년 11월 8일
댓글: Mohammed Cha 2020년 11월 8일
Hello everyone,
I am new on Matlab and need one help. At attached my csv data which i want to read on matlab and want to create a figure ( Column B on X axis and Column C on Y axis). It is basically ratingtime vs Velocity.
Could you please help me ?
Thank you very much in advance
  댓글 수: 2
Walter Roberson
Walter Roberson 2020년 11월 8일
What is the expected interpretation of
09276215;0;;;;;;;;
3943927;-3
Your column 1 is all 0 until row 1264, and column 2 has leading digits that are increasing up to that point. Then at row 1264 column 1 becomes 1 and the leading digit of column 2 goes back to 0. It looks to me as if column 1 and column 2 together form a number.
Question: has this been produced on a system that uses comma as a decimal separator, and semicolon as the field separator?
Mohammed Cha
Mohammed Cha 2020년 11월 8일
Thank you for the feedback. Sorry i forgot to change the comma symbol as it is in german version. I have updated it in english version. column 2 is time and column 3 is velocity.
Thank you in advance

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

채택된 답변

Walter Roberson
Walter Roberson 2020년 11월 8일
S = fileread('myData.csv');
S(S==',') = '.';
data = cell2mat( textscan(S, repmat('%f', 1, 11), 'Delimiter', ';', 'headerlines', 1));
plot(data(:,2), data(:,3));
  댓글 수: 1
Mohammed Cha
Mohammed Cha 2020년 11월 8일
Hello Walter, I have a small question on your code. Yes i need to plot column 1 and 3 as its time and velocity. I had did mistake in csv. I just edited the code and tried to make figure as attached. Could you please help me to remove noise from it? marking in figure stets which i need to plot other things (such as second wave after first wave) want to remove. My samling rate is 10000Hz.
S = fileread('RawData.csv');
S(S==',') = '.';
data = cell2mat( textscan(S, repmat('%f', 1, 11), 'Delimiter', ';', 'headerlines', 1));
time=data(:,1)
t=time(3:end)
Measured_signal_=data(:,3)
Measured_signal=Measured_signal_(3:end)
plot(t,Measured_signal)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by