Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is the MATLAB code that would answer this list of tasks? intersect Find set intersection of two arrays Array elements that are members of

image text in transcribed

What is the MATLAB code that would answer this list of tasks?

image text in transcribed
image text in transcribed
intersect Find set intersection of two arrays Array elements that are members of set ismember issorted Determine whether set elements are in sorted order setdiff Find set difference of two arrays Find set exclusive OR of two arrays setxor Find set union of two arrays union unique Find unique values in array When working with these function you can use different types of arrays. Two handy types for this class are number arrays and character arrays. For example, try these in MATLAB: [1 4 20] ['a', 'b', 'f'] 'bfz' A D = 'a':'f' For this assignment, rework the problems 2.63, 2.64, 2.65 in a MATLAB script. At the beginning of the script have the following: % Your name clear all; close all; clc; format compact; Compute the following multinomiai coethcients! (62), (4220). (6.222) 10 (a) (c) 4,2 6! (3.2.1) = 31211 6.5.4.3.2 -1 3-2-1.2.1.1 3.2-121-1 = 60 %3D 8! 8-7.6.5-4.3-2-1 = 420 4! 2! 21 0! 4.3-2.1.2.1.2.1-1 The expression 3.2.2) 10 10. (5,3,2, 2) has no meaning, since 5+3 + 2 +2 moodt odT Supplementary Problems SETS AND SUBSETS blod mosoot odi sa = (a.b.c.....V.z}. Furthermore, identify *01. List the elements of the following sets if the universal set is which of the sets, if any, are equal. C = {x:x precedes f in the alphabet} D = {x:x is a letter in the word "title"} A = {x:x is a vowel} B= {x: x is a letter in the word "little"} 2.62. 00 zninaoo bg s mol wo Let A = {1,2, ..8,9}, B {2,4, 6, 8}, C = {1,3, 5, 7,9}, D= (3,4, 5}, and E = {3, 5}. Which of the above sets can equal a set X under each of the following conditions? %3D %3D (a) X and B are disjoint (c) XCA but XgC XG D but X 4 B (6) O6 (d) XCC but XgA SET OPERATIONS Problems 2.63-2.66 refer to the universal set U = {1,2, 3, ... , 8, 9} and the sets: C = {1,3,5, 7, 9} A = {1,2, 5, 6}, B = (2,5, 7}, %3D 2.63. Find: (a) AN B and AnC, (b) AUB and BUC, (c) A and C. 2.64. Find: (a) A\B and A\C, (b) A B and A C. CAP. 2] SETS AND COUNTING 2.65. Find: (a) (AUC)\B, (b) (AU B), (c) (BO C)\A

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions