error using find: Matrix dimensions must agree

1 visualizzazione (ultimi 30 giorni)
Jack Ie
Jack Ie il 22 Apr 2016
Commentato: Walter Roberson il 22 Mag 2017
comms is a matrix and nb is a vector with different dimensions.
[nb_comms,~]=find(comms==nb);
error: Error using == Matrix dimensions must agree.

Risposte (1)

Star Strider
Star Strider il 22 Apr 2016
I am not certain what you are doing. See if the intersect or related functions do what you want.
Example:
comms = randi(99, 1, 50);
nb = randi(50, 1, 10);
[nb_comms, idx_comms, idx_nb] = intersect(comms,nb);
  1 Commento
Walter Roberson
Walter Roberson il 22 Mag 2017
Siamak comments to Star Strider:
Thank you so much for your helpful answer

Accedi per commentare.

Categorie

Scopri di più su RF Toolbox in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by