Info

This question is closed. Reopen it to edit or answer.

Write a function called sum_range that takes two numbers, computes their sum and (a)outputs 1 if their sum is greater than or equal to zero. (b)outputs 0 if their sum is less than zero. Write the code

1 view (last 30 days)
function sum_range=sum_range
i=[-1;-8;-4]; j=[2;3;6];
if i>j
A(i,j)=1
end
if i<j
A(i,j)=0
end

Answers (0)

This question is closed.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!