code for summing of 2 Variables: (write in m- file or commmand window)
this is the code used for summing of 2 variables and storing result in variable c the output is

Subtraction code:

multiplying and dividing:

the arthematic operation are performed as shown in above examples
a = 10 (initilizing "a ")
b =20 (initilizing "b")c = a+b ('+' operator is used for summing two variables')
this is the code used for summing of 2 variables and storing result in variable c the output is

Subtraction code:
a=10
b=5
c=a-bthe output is

multiplying and dividing:
a=10
b=5
c=a*b ( '*' operator is used for subtraction)
d=a/b (' / ' operator is used for division)The output is

the arthematic operation are performed as shown in above examples
No comments:
Post a Comment