Filter löschen
Filter löschen

X and Y coordinate extraction from a vector

2 Ansichten (letzte 30 Tage)
mahesh bvm
mahesh bvm am 29 Okt. 2018
Kommentiert: KSSV am 30 Okt. 2018
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 Kommentare
KSSV
KSSV am 29 Okt. 2018
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 am 29 Okt. 2018
This is the data. Please take a look into it.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

KSSV
KSSV am 29 Okt. 2018
[num,txt,raw] = xlsread('displacement.xls') ;
x = 1:length(num) ;
plot(x,num) ;
  2 Kommentare
KSSV
KSSV am 30 Okt. 2018
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 am 30 Okt. 2018
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.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by