MATLAB: 3 plane to array vectorization

vectorization

I have data in a matrix Atr
>> whos Atr
Name Size Bytes Class Attributes
Atr 7x3x2500 420000 double
I want to extract Atr(1,1,:) into a row vector Q. I tried like this
>>Q=Atr(1,1,:);
>> whos Q
Name Size Bytes Class Attributes
Q 1x1x2500 20000 double
But I need to store in a signle rwo vector . And also tried in this way
for i=1:2500
Q(i)=Atr(1,1,i);
end
>> whos Q
Name Size Bytes Class Attributes
Q 1x1x2500 20000 double
But no help. How can I store in a single row vector ?

Best Answer

doc squeeze
Q=squeeze(Atr(1,1,:));