- #1
Steve Collins
- 46
- 0
I have to replace some matrix columns with some vectors. I am currently copying the original matrix and replacing the column of the matrix I have copied eg:
matrix_1 = matrix_2
matrix_2(:,4) = vector_1
This works fine, but I was wondering if it was possible to maybe amend the original matrix and assign the result a new name?
something like:
(matrix_1(:,4) = vector_1) = matrix_2 'I know this is nonsense, I'm just trying to explain what I mean.'
You can probably tell that I have only just picked up the Matlab book so please bear in mind that my knowledge is very very basic.
Thanks
Steve
matrix_1 = matrix_2
matrix_2(:,4) = vector_1
This works fine, but I was wondering if it was possible to maybe amend the original matrix and assign the result a new name?
something like:
(matrix_1(:,4) = vector_1) = matrix_2 'I know this is nonsense, I'm just trying to explain what I mean.'
You can probably tell that I have only just picked up the Matlab book so please bear in mind that my knowledge is very very basic.
Thanks
Steve