0

I have instruments that sample data a .00025 (quarter mil) rate. I typically record 10-20 seconds of data which gives me 40K-80K lines and 7 columns. I need to plot some of that data in wave form to illustrate displacement amongst other things. Need direction new to this MATLAB/Octave world.

Example of data:

Timestamp,Ref,RM,BP,GF,RM G's,RM in. per sec.
19/04/24 14:48:58.136,0,1392.246,3058.145,4450.391,0,0
19/04/24 14:48:58.136,0,1466.381,2944.569,4410.95,0.133059412,0.513729084
19/04/24 14:48:58.136,0,1325.902,3119.985,4445.887,0.120312347,0.464513942
19/04/24 14:48:58.136,0,1367.778,3059.484,4427.262,0.124112176,0.479184699
19/04/24 14:48:58.137,0,1391.516,2822.838,4214.354,0.126266162,0.487501024
19/04/24 14:48:58.137,0.04564941,1365.465,3105.377,4470.842,0.123902294,0.478374367
19/04/24 14:48:58.137,0.1369482,1416.349,3075.431,4491.78,0.128519508,0.496200969
19/04/24 14:48:58.137,0.1521647,1349.275,2953.091,4302.365,0.122433214,0.472702394
19/04/24 14:48:58.138,0.2738965,1413.671,3133.862,4547.533,0.128276507,0.495262764
19/04/24 14:48:58.138,0.4260611,1423.166,2939.578,4362.744,0.129138083,0.498589224

Opened csv file in Octave but don't know what to do with it to plot it.

would like to plot waves which show displacement may need to apply a formula to each value to go from Force to Displacement.

Tasos Papastylianou
  • 21,371
  • 2
  • 28
  • 57

1 Answers1

0

You can't use csvread in this case because all data needs to be numerical and you've clearly got a date in there.

So instead I suggest you try things out based on the following:

  • Use fileread to obtain the contents as a single string
  • Use strsplit to split on \n (newline) characters to get rows
  • Use strsplit again to split on ',' characters to get tokens
  • Use datenum or datevec to obtain a suitable numerical representation of the date part (e.g. datenum(Token{1}, "dd/mm/yy HH:MM:SS.FFF") )
  • Save all numbers involved in a suitable array as you do this
  • Plot the relevant stuff once you have this array. (be careful of this issue though)
Tasos Papastylianou
  • 21,371
  • 2
  • 28
  • 57