Is it possible to convert a 2-D vector into a 4-D vector in matlab ?
I could create 2-D vectors like for example:
A = [[1 2];[3 4]] -->(code segment_1)
and 4-D vectors like
A = ones(2,3,4,8) -->(code segment_2)
Is it possible to create a 4-D vector like how we could create the 2-D vector using code_segment_1? (Let me be more clear, A=[[[1 2],[3 4]],[[5 6],[7 8]],[[9 10],[11 12]]]
is creating a 1x12 matrix instead)
Also I saw we use reshape
function to convert a k-Dimensional matrix into l-Dimensional matrix where k > l. This is basically down scaling but can we upscale the dimensions?
A(:,:,:,k)
notation or reshape a1D
or2D
version of the input into4D
. β Divakarreshape
can also "upscale". Just feed it with the appropriate dimensions β Luis Mendo