필터 지우기
필터 지우기

X and Y coordinate extraction from a vector

조회 수: 3 (최근 30일)
mahesh bvm
mahesh bvm 2018년 10월 29일
댓글: KSSV 2018년 10월 30일
I have a vector which represents displacement over time. Its a 7116 by 1 matrix. How do i extract the x and y coordinates from this.
  댓글 수: 2
KSSV
KSSV 2018년 10월 29일
You have only displacement ..values...how do you expect to have (x,y) positions? You can only get the indices....if it is okay..attach the data.
mahesh bvm
mahesh bvm 2018년 10월 29일
This is the data. Please take a look into it.

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

답변 (1개)

KSSV
KSSV 2018년 10월 29일
[num,txt,raw] = xlsread('displacement.xls') ;
x = 1:length(num) ;
plot(x,num) ;
  댓글 수: 2
KSSV
KSSV 2018년 10월 30일
mahesh bvm commented: It works! Thank you so much. May I know the difference between the data coded in 'num' and 'raw' outputs. I did go through the xlsread but could not understand it clearly.
KSSV
KSSV 2018년 10월 30일
num gives you only numeric data.
txt gives you only text data.
raw gives you entire data in a cell array.
Thanks is accepting/ voting the answer.

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

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by