Info
此问题已关闭。 请重新打开它进行编辑或回答。
IMAGE Processing(matrix comparision)
1 次查看(过去 30 天)
显示 更早的评论
Hi All,
if i have two matrix to be compared, and i dont want perticular element to be compaered, how do i do that in matlab..??
for Ex
A=[1 8 8
7 6 *
9 9 9]
B=[3 5 6
5 6 5
9 0 9]
as u can see a '*' symbol in matrix a, so while comparing A and B i dont want to compare the element at the '*' postion in A, with the corrosponding B's element..
please help me in this regard,
Thank You in advance.
[EDITED: Code formatted, Jan Simon]
2 个评论
Chandra Kurniawan
2011-12-16
Actually, you cannot put '*' in numeric array.
You can use other array to define the position of '*'
Eq :
pos = [2 3];
回答(1 个)
Jan
2011-12-16
What exactly does "compare" mean? It would be easier to create an answer, if this detail need not to be guessed.
Perhaps:
mask = logical([1, 1, 1; 1, 1, 0; 1, 1, 1]);
isequal(A(mask), B(mask))
5 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!