how can i obtain this?
1 次查看(过去 30 天)
显示 更早的评论
HI
ihave data with dimension 153*1 and i want to perform for loop in order to obtain 153*71 where 71 is position along horiziontal axis but i tried to perform it and i got 153*71 but duplicated rows and columns and this is doesnt make sense so how is it linspace function useful for this?
回答(2 个)
Cris LaPierre
2021-11-8
编辑:Cris LaPierre
2021-11-8
You have not shared your code so it's a little challenging to say what is happening, but if I were to start with a 51x71x3 matrix, and wanted to change it to 153x71, where each column is all the data in the indicated column across all 'sheets', I'd use permute then reshape.
d_pred = rand(51,71,3);
D_pred = permute(d_pred,[1 3 2]);
D_Pred = reshape(D_pred,153,[]);
size(D_Pred)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!