How to use an efficient lookup table
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Phillipp
am 6 Apr. 2020
Beantwortet: Phillipp
am 8 Apr. 2020
Hey guys,
I have two matrices that are imported from a .csv via the readtable or readcell command, I will have to check later which one I need later. I only know that I cannot use readmatrix
One contains names of crossings that can be a mix from letters and numbers.
A = [10581, 1681, 2145, d1q46]
The other matrix contains the streets with start and endpoints that are the streets.
B(:,1)= [d1q46; 10581; 1681; 2145; 10581; 1681]
I need the vector that outputs the indices of matrix A when the elements of A and B are equal. So I need the incidence matrix
At the moment I', trying to do this with two for loops, but it takes about 10 Minutes to finish, because both matrices have about 10.000 elements and may even be much bigger in the future.
Is it possible to do this faster? My only other option would be to let it calculate and save the result somewhere. Which would be okay but not great.
With kind regards
Phillipp
Edit: Pressed enter before finished checking the question for errors.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Tables finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!