how to take set difference keeping the number of rows and columns same.

1 次查看(过去 30 天)
I have a matrix of 128*252 and second matrix of 128*21 .I want to take difference of these two matirx but in return i want 128*231 matrix ,but matlab gives me 29561*1 matrix. How to solve it? Any body please help its urgent.

回答(1 个)

Walter Roberson
Walter Roberson 2017-5-24
Consider that the set difference of [3 -7 18 3], against the empty set [], is [-7 3 18], with fewer entries in its representation, but [3 -7 18 4] against the empty set [] would be [-7 3 4 18] with the same number of entries. Therefore unless you happen to know some fairly strict properties on your matrices, the size of the set difference is not going to be predictable, and the result might or might not happen to have length divisible by the number of rows you have.
Perhaps you have some quite different idea of "set difference" in mind??

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by