采用squeeze函數,官方說明如下:
https://ww2.mathworks.cn/help/matlab/ref/squeeze.html
舉例:
代碼:
a=rand(2,1,3)
b=squeeze(a)
size(b)
運作結果如下:
采用squeeze函數,官方說明如下:
https://ww2.mathworks.cn/help/matlab/ref/squeeze.html
舉例:
代碼:
a=rand(2,1,3)
b=squeeze(a)
size(b)
運作結果如下: