Question: Using Matlab; Complete the implementation of the compArray function, which classifies a pair of arrays (supplied as input variables) as being not equal or equal.
Using Matlab;
Complete the implementation of the compArray function, which classifies a pair of arrays (supplied as input variables) as being not equal or equal.
Input variables:
| a | An arbitrary numeric scalar, vector or matrix. |
| b | An arbitrary numeric scalar, vector or matrix. |
Output variables:
| result | A logical scalar value that classifies the two arrays as either not equal (designated by logical true) or equal (designated by logical false). |
Notes:
If two arrays have different dimensions, they are by definition unequal.
Two arrays of the same size are equal if and only if the corresponding elements at each position in the respective arrays are equal.
The result returned must be logical (true or false), rather than numeric.
This question can easily be completed without the use of loops.
You must not use any of the following Matlab built-in functions in your solution: isequal, isequaln.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
