You have two problems in one line. Worse, you have two problems virtually within the same character. Hey, that could be a record. ;-)
You write that "test".
First, A=.3 is NOT a test. MATLAB uses = to assign something to a variable. So you would write
to assign the value 0.3 to A.
If you want to test for EXACT equality, you use == not = for the test.
So your first problem was the test for quality. But that is also your second problem. You should NEVER test for exact equality to a floating point number. MATLAB does not store the number 0.3 as an exact decimal. Instead, you should test for approximate equality. So you might do this instead:
if abs(A - 0.3) < eps
disp("A is reasonably close to 0.3.")