Question: Matlab Assume that at each row of a 2D character array there is a string which can have duplicate characters. Using Octave, write a function

MatlabAssume that at each row of a 2D character array there is

Assume that at each row of a 2D character array there is a string which can have duplicate characters. Using Octave, write a function called "is existing" that will accept two inputs: An array (say X) with above-given properties, and another 2D character array (say Y) whose number of columns is equal to the number of columns of X. The number of rows of these two arrays can be different. The output will be a column vector whose number of rows is equal to the number of rows of Y. For any row of Y, if there exists a row of X that is composed of a permutation of the string given in this row of Y, the corresponding element of the output vector will be logical 1. Otherwise, it will be logical 0. (You may NOT use any built-in functions except size. length, rem and mod) Example: 13336 'VZEL8A3V '99 '919EY9EN' 'C3C3C3C3' Y =631A3B3C' 99) X = If Z-is_existing(X,Y), Z = 1

Step by Step Solution

3.34 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem well create a function isexisting that checks for each row in array Y if theres any row in array X that is a permutation of it W... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!