Problem 2230. Back to basics - array operations
Without performing actual arithmetic operations on arrays, return feasibility of operation as true or false. True if given operation can be performed on given matrices, else false.
Example
Operation = 'Add'
Matrices are:
a = magic(3);
b = [2 2; 2 2; 2 2]
Result: false, since size of a and b should be same to perform "Add" operation.
Solution Stats
Problem Comments
-
2 Comments
Nikolaos Nikolaou
on 28 Oct 2020
test case 7 and 8 are identical with different result plz fix
goc3
on 28 Oct 2020
@Nikolaos Nikolaou: while input variables are the same in test cases 7 and 8, they are passed to the function in different orders.
Solution Comments
Show commentsProblem Recent Solvers51
Suggested Problems
-
11614 Solvers
-
2199 Solvers
-
Getting the row and column location from a matrix
286 Solvers
-
Find the square of the sum of the digits of a number
156 Solvers
-
Replace every 3rd element in a vector with 4
252 Solvers
More from this Author25
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!