ManiAm/VENTOS_Public

regarding plotting of matlab scripts using Speedprofile.m

bargisou opened this issue · 4 comments

capture

vehicleData.txt

using speedprofile.m file and the above vehicledata.txt file the plot is not being displayed ...above plot getting displayed but graph is not getting uploaded

I have not tested the script for a while, so you might need to change the script based on your own needs. But looking at your vehicleData.txt, the vehicle speed is very low. That's why the graph is a small dot around zero on the top. Try to zoom-in to the top graph.

000_vehicleData (1).txt

if i upload entire data file following is the error generating

reading and parsing the vehData.txt file ...
Subscript indices must either be real positive integers or logicals.

Error in SpeedProfile (line 56)
vehiclesSpeed(index,vNumber) = speeds(i,1);

As I mentioned in my last post, the Matlab script assume that a specific sets of columns are present in the txt file. If you look at line 18 and also 22-27, you will see how the columns are interpreted.

https://github.com/ManiAm/VENTOS_Public/blob/master/scripts/SpeedProfile.m

column 1: index
column 2: timestamp
column 3: vehicle
column 4: pos
column 5: speed
column 6: accel

Now go back and look at your txt file. Your txt file has one extra column (frontspacegap).
You need to update line 18 of the matlab script to:

formatSpec = '%d %f %s %f %f %f %f';

I have added one more %f to the end.

capture

Thank you ... its displaying