Ask Question
26 August, 11:52

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.

+1
Answers (1)
  1. 26 August, 15:47
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers