错误使用 reshape 大小参数必须为整型实数。
16 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
果博东方游戏网址【微8785092】
el 23 de Mayo de 2023
Respondida: 果博东方开户网址【微8785092】
el 23 de Mayo de 2023
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
0 comentarios
Respuesta aceptada
果博东方开户网址【微8785092】
el 23 de Mayo de 2023
你的m不是整数,使用reshape函数需要你自己注意维度参数,你有12个元素可以拆成3和4,那你有13个元素,咋拆成3和4,所以就得将13个元素中去除一个元素,在使用reshape,自己先计算一下吧
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!