Ask Question
17 December, 17:16

Mypiecewise (a, b, c) which takes three inputs:

a: A real number. b: A real number. c: A real number.

Note: You may assume that a ≥ 0 and b ≥ 0.

Does: Uses an if statement to do the following:

• If c = 0 return 5 (a + b).

• If c > 0 return ab=c.

• If c < 0 return - 7.

Returns: As above.

+5
Answers (1)
  1. 17 December, 17:17
    0
    function result = mypiecewise (a, b, c)

    if (c==0)

    result=5 (a+b);

    elseif (c>0)

    result = (a*b=c);

    else

    result=-7;

    end

    end

    Explanation:

    It is done in matlab.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Mypiecewise (a, b, c) which takes three inputs: a: A real number. b: A real number. c: A real number. Note: You may assume that a ≥ 0 and b ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers