You included the answers in the file, and MATLAB is trying to interpret them as commands. My guess is that you don't need the diary commands either, so a working file would look like this:
A = [1,2,3,4];
B = [4,3,2,1];
C = (A+B);
disp(C);
D = (sin(A));
disp(D);
Best Answer