Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function with the header: function [out] = myDataTypeChecker(A,B) takes two matrices A and B and has the following behavior (in this order): 1)

Write a function with the header:

 function [out] = myDataTypeChecker(A,B) 

takes two matrices A and B and has the following behavior (in this order):

  1. 1) if either A or B contains a Not a Number, the function should return -1.

  2. 2) if either A or B contains an +/-Infinity, the function should return -2

  3. 3) if either A or B is a character array, the function should return -3

  4. 4) if both A and B are logical arrays, the function should check to see if A and B

    are the same size.

    1. If they are not, it should return -4

    2. If they are, it should return the AND of A and B (an array indicating where

      both A and B are true)

  5. 5) if both A and B are numeric arrays, the function should check to see if A and B

    are the same size.

    1. If they are not, it should return -5

    2. If they are, it should return an array of the absolute value of the difference

      of A and B.

  6. 6) If A and B are not both logical arrays or not both numeric arrays,, it should return

    -6;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

Students also viewed these Databases questions

Question

What is RAM as far as telecommunication is concerned?

Answered: 1 week ago

Question

Question 1: What is reproductive system? Question 2: What is Semen?

Answered: 1 week ago

Question

Describe the sources of long term financing.

Answered: 1 week ago