ManiAm / VENTOS_Public

VEhicular NeTwork Open Simulator (VENTOS)
http://maniam.github.io/VENTOS/
GNU General Public License v3.0
57 stars 25 forks source link

regarding plotting of matlab scripts using Speedprofile.m #38

Closed bargisou closed 6 years ago

bargisou commented 6 years ago

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

ManiAm commented 6 years ago

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.

bargisou commented 6 years ago

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);

ManiAm commented 6 years ago

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.

bargisou commented 6 years ago

capture

Thank you ... its displaying