错误使用 reshape 大小参数必须为整型实数。

16 visualizaciones (últimos 30 días)
果博东方游戏网址【微8785092】
x=cos(2*pi*30*t)+sin(2*pi*120*t);
encode=PCMcoding(x);
m=length(encode)/8;
encode=(reshape(encode',8,m))';
错误使用 reshape
大小参数必须为整型实数。
出错 PCMdecoding (line 3)
encode=(reshape(encode',8,m))';
这是什么原因啊?有没有大佬来帮帮我:Q

Respuesta aceptada

果博东方开户网址【微8785092】
你的m不是整数,使用reshape函数需要你自己注意维度参数,你有12个元素可以拆成3和4,那你有13个元素,咋拆成3和4,所以就得将13个元素中去除一个元素,在使用reshape,自己先计算一下吧

Más respuestas (0)

Categorías

Más información sobre MATLAB 快速入门 en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!