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

14 ビュー (過去 30 日間)
果博东方游戏网址【微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

採用された回答

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB 快速入门 についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!