saving . . . saved How to verify if an operation is binary or not in scilab has been deleted. How to verify if an operation is binary or not in scilab has been hidden .
How to verify if an operation is binary or not in scilab
##### Question
How to verify if an operator Is binary or not in scilab....
This is the question how to write a program for it
Verify whether the following operation is binary or not in the interval [10,-10]
f(x,y)=x+y

Scilab General None min None sec 12-03-15, 6:54 p.m. Vidhuantony

Dear Vidhuantony,

You have to use 2 for loop to generate the numbers between the interval and if-loop to check whether the number generated is binary.

Below is the code:

<font color="#000099">clc;
for i=-10:1:10 //To generate number between 10 and -10
for z=-10:1:10
ans=z+i
if ans ==1 then
printf("\\n The value of f(x,y)=%d, and the answer is binary",ans)
elseif ans==0 then
printf("\\n The value of f(x,y)=%d, and the answer is binary",ans)
else
printf("\\n The value of f(x,y)=%d, and the answer is not binary",ans)
end //end of if loop
end //end of inner for loop
end //end of outer for loop
</font>
Regards,
Lavitha Pereira
Scilab Team
12-03-15, 7:54 p.m. Lavitha Pereira