Setdiff usage in matlab

Source: Internet
Author: User

Setdiff usage in matlab

Help document content:

SETDIFF (A, B) when A and B are vectors returns the values
In A that are not in B. The result will be sorted. A and B
Can be cell arrays of strings.
 
SETDIFF (A, B, 'rows ') when A are B are matrices with the same
Number of columns returns the rows from A that are not in B.

Understanding:

Setdiff () function in matlab: used to determine different elements in two Arrays

C = setdiff (A, B)
Returns the values in A, but not in B. The result vector is returned in ascending order. In set theory, c = A-B. A and B can also be string cell arrays.
C = setdiff (A, B, 'rows ')

When A and B are matrices with the same number of columns, the rows in A but not in B are returned.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.