a=x=(0.4+(2/100)), b=y=0.2, c=z=(0.7+(2/100)) in matlab

To assign values to variables in MATLAB, you can use the equals sign (=) operator. Here's how you can assign the values to variables a, b, c, x, y, and z:

main.m
a = x = (0.4 + (2 / 100));
b = y = 0.2;
c = z = (0.7 + (2 / 100));
67 chars
4 lines

In MATLAB, this notation allows you to assign the same value to multiple variables in one line.

Note that in your code, you used the equals sign twice (a=x=(0.4+(2/100))). In MATLAB, the equals sign is used for assignment, so you only need to use it once.

After running this code, the variables a, b, c, x, y, and z will be assigned the specified values:

main.m
a = 0.4020
b = 0.2
c = 0.7020
x = 0.4020
y = 0.2
z = 0.7020
60 chars
7 lines

Make sure to run this code in a MATLAB script or in the command window to see the assigned values.

Keep in mind that MATLAB uses the order of operations (PEMDAS/BODMAS) when evaluating mathematical expressions.

gistlibby LogSnag