How can i match a value in variable with data stored in database?

2 views (last 30 days)
Rya on 17 May 2017
Commented: Rya on 31 May 2017
I have created automated number plate detection application after no plate extraction I have created database which holds record of registered car no only, Now i want to check whether the extracted number lies within the database or not

Sign in to comment.

Accepted Answer

MathReallyWorks on 17 May 2017
Hello Dear,
Use this code with some changes as per your requirement:
clear all
X = [1 323 2 44 3 66 77 88 2 1 2 3 34 56 78 5 7 4 44 28]; %DataBase
b = input('enter the number you want to check:');
n = find(X==b);
A = isempty(X(n));
if A==1
disp('The number is not present in database');
disp('The number is present in database');

Sign in to comment.

More Answers (0)


Community Treasure Hunt

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

Start Hunting!