Adding two columns together to create a new column of data
I am trying to add two columns of data together to create a new column, but I am receiving an error message and the data is not being added appropriately.
For example, I want to create something where I add the values of R and L to create Z:
R L Z
1 7 8
2 2 4
3 5 8
4 1 5
However when using a simple code like:
Z = R + L
We are receiving an error. I tried using the sum function, but it is simply adding all the vairables together, but not adding each row individually to create this variable Z that is a new column.I am trying to add two columns of data together to create a new column, but I am receiving an error message and the data is not being added appropriately.
For example, I want to create something where I add the values of R and L to create Z:
R L Z
1 7 8
2 2 4
3 5 8
4 1 5
However when using a simple code like:
Z = R + L
We are receiving an error. I tried using the sum function, but it is simply adding all the vairables together, but not adding each row individually to create this variable Z that is a new column. I am trying to add two columns of data together to create a new column, but I am receiving an error message and the data is not being added appropriately.
For example, I want to create something where I add the values of R and L to create Z:
R L Z
1 7 8
2 2 4
3 5 8
4 1 5
However when using a simple code like:
Z = R + L
We are receiving an error. I tried using the sum function, but it is simply adding all the vairables together, but not adding each row individually to create this variable Z that is a new column. columns, matrix array MATLAB Answers — New Questions