As always I realise this is a simple question but being relatively new to the power of Octave I am struggling to get my head around this. I have a cell array A, which contains vectors. I wish to delete the last two values from each vector and finally append a vector contained within another cell array to each. Here is a minimal example:
A = {[1 2 11 12] [1 2 11 12] [1 2 11 12]}
A =
{
[1,1] =
1 2 11 12
[1,2] =
1 2 11 12
[1,3] =
1 2 11 12
}
B = {[3 4 5] [3 4 5] [3 4 5]}
B =
{
[1,1] =
3 4 5
[1,2] =
3 4 5
[1,3] =
3 4 5
}
Thus I want to end up with:
C =
{
[1,1] =
1 2 3 4 5
[1,2] =
1 2 3 4 5
[1,3] =
1 2 3 4 5
}
Any pointers to documentation on this etc. would be great.
Thanks, Matt
use
cellfun: