Reputation: 14684
I have a value with the type 1x1x4 double
and need to make a 1x4 double
out of it.
The problem is, I dont know how to do it. Can anybody help me?
It looks like:
val(:,:,1) =
0.5601
val(:,:,2) =
0.4876
val(:,:,3) =
0.8146
val(:,:,4) =
0.6207
But it should be:
1x4 double =
0.5601 0.4876 0.8146 0.6207
Upvotes: 0
Views: 218
Reputation: 11168
If all the other dimensions are singleton, and the result would be just a 1D vector, you can also use the following:
val(:)'
Upvotes: 2