File Exchange

image thumbnail

VANET Simulation in MATLAB

version 2.0.2 (20.3 KB) by Abhishek Gupta
This Repository is targeted to VANET simulation in MATLAB


Updated 28 Jan 2019

GitHub view license on GitHub

Originally reactive protocols were not design for the characteristic of highly mobility during route discovery. Due to dynamically modification to the VANET this changes very often due to breakdown which causing excessive broadcasting and flooding the entire network in order for new routes to be discovered. In additional, the initial of routing need some time and this latency can easily change everything. Due to these reasons, the typical reactive protocols, in their current format, do not totally appropriate for time critical applications such as cooperative collision avoidance (CCA). The Cooperative Collision Avoidance is an important class of safety applications in VANETs, which aims at offering earlier warning to drivers using vehicle-to-vehicle (V2V) communication [13]. Ad Hoc On Demand Distance Vector (AODV) is an reactive routing protocolwhich capable of both unicast and multicast. In AODV, like all reactive protocols,topology information is only transmitted by nodes on-demand. When source hassomething to send then initially it propagates RREQ message which is forwarded byintermediate node until destination is reached. A route reply message is unicastedback to the source if the receiver is either the node using the requested address, or ithas a valid route to the requested address.

This repository provides a MATLAB simulaiton of VANET enviornment and rsults comparison in terms of throughput, packet drop ratio etc. More information can be reached at

Cite As

Abhishek Gupta (2020). VANET Simulation in MATLAB (, GitHub. Retrieved .

Comments and Ratings (11)

Ahmed Elshrkasi

great work

Abhishek Gupta

It is already here. Download it.

Afiqah Suzelan Amir

Can you provide the coding?

Abhishek Gupta

I write this code a few years back and now don't have the reference paper

sohail aslam

Please can you send the reference paper for the above code,?

Abhishek Gupta

The code is now updated and the previous issue which was due to MATLAB version difference is resolved.

Le Wang

akash sonnad

I didn't close the GUI figure and entered the inputs but I got the error as>@(hObject,eventdata)anish('Simulate_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.

Abhishek Gupta

Hi Sameer Sheikh

please follow the video to run the code. It seems you closed the GUI figure which pops up after code run.

Sameer Sheikh

HI Sir, Can we use this for modeling V2I communication? I run a code but the below error occurred.>@(hObject,eventdata)anish('Simulate_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.

ali mohamed

what the throughput of vanet that you calculated are the packet sent or



UrbanCitySimu.m updated. randint is removed and replaced with randi for newer versions of MATLAB


title updated


uploaded screenshot only

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags