Matlab 使用重采样时,错误向量的长度必须相同?

Matlab 使用重采样时,错误向量的长度必须相同?,matlab,size,signal-processing,sampling,Matlab,Size,Signal Processing,Sampling,在录音机MATLAB 2014版功能方面我有问题与大小有关吗 我无法在2014版中使用录波器。我试着寻找答案,但没有找到 请告诉我应该做哪些更改,以便它们可以具有相同的大小 Error using + Matrix dimensions must agree. Error in FM (line 52) fm1=cos( W1*t + f_dev1*a1 ); %The FM modulation function fm1 Did you mean: >> size

在录音机MATLAB 2014版功能方面我有问题与大小有关吗

我无法在2014版中使用
录波器
。我试着寻找答案,但没有找到

请告诉我应该做哪些更改,以便它们可以具有相同的大小

Error using  + 
Matrix dimensions must agree.

Error in FM (line 52)
fm1=cos( W1*t  +   f_dev1*a1 );  %The FM modulation
function fm1


Did you mean:
>> size(a1)

ans =

           1      352800

>> size(t)

ans =

           1     1411200



    % FM MO.mod&DE.mod code 
    fs=352800;
    x = 88200;                     % The sample frequency
    ts=1/fs;                        % time steps size
    t=0:ts:4-ts;                    % The time interval, it starts from zero
    No= length(t);                  % length of the time vector

    x1 = audiorecorder(x, 16, 1); 
    disp('Start speaking.') 
    recordblocking(x1, 4);
    disp('End of Recording.');   


    m1=getaudiodata(x1);              

    %The transpord to avoid mismatch size of vectors
    m1=m1'

    cutoff=4000;
    [a b]=butter(6,2*cutoff*ts);

    y1=filter(a,b,m1)  ;
    fc1=50000    ;         % carrier frequency for fm1&fm3
    f_dev1=(2./max(y1))*pi*8000       ; 

    W1=2*pi*fc1;                

    a1=(cumsum(y1).*ts); %here size of a1 352800


    fm1=cos( W1*t  +   f_dev1*a1 );  % here is the problem size t of 1411200
                                          wilea1 352800
下面的行将与波形记录器一起工作

fs=352800;


x= 88200; %whatever sampling frequency your system supports


m1=wavrecord(4*x,x) % The length of this vector or speech signal will be 4x which will creat a lot of problems at the code.


m1=resample(m1,fs,x); % Now the length of the vector has been converted to No and everything will work.

我可以对录音机使用相同的方法吗?

每个变量的预期大小是多少?我认为,因为它是调频调制,所以我将声音重新采样到352800,但你知道时间会乘以4(352800)我想两者都是352800可能的副本,从第一部分到答案,只使用代码,但没有
corrcoff
partI我不明白你的意思,请问corrcoff是什么