Ask Question
25 November, 04:38

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.

+4
Answers (1)
  1. 25 November, 08:01
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers