How to check two unbalanced matrix?
1 view (last 30 days)
Show older comments
Matlab111 on 25 Jan 2015
Commented: Star Strider on 25 Jan 2015
if this matched than i should get Z as matched value like this
I don’t understand what you are doing or what ‘matched’ means.
It would seem that the intersect function might be what you want:
Z = intersect(X,Y)
that would produce:
In that event, it would be necessary to use the R2014b version of round on both, or equivalently:
roundn = @(x,n) fix(x.*10.^n)./10.^n;
wnere x is the number (or matrix) to be rounded, and n the number of digits to be rounded to.
Shoaibur Rahman on 25 Jan 2015
Another way may be:
Z = X(X==Y)
Find more on Resizing and Reshaping Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!