MATLAB: I want to add column 1st from data1 and coloumn 1st from data2, likewise addition of all coloumn.

add

DATA1
4 8 6
3 5 7
1 9 2
DATA2
7 8 4
5 2 4
1 7 9

Best Answer

MATLAB makes these things really easy:
>> A = [
4 8 6
3 5 7
1 9 2];
>> B = [
7 8 4
5 2 4
1 7 9];
>> A + B
ans =
11 16 10
8 7 11
2 16 11
Note that it would probably be a bad idea to create three separate variables: programming is easiest when you keep your data together as much as possible (e.g. in one array, like I show), because then you can loop and apply to functions to an entire array.