Embedded matlab function error..
1 次查看(过去 30 天)
显示 更早的评论
i am using an embedded matlab function block and i wrote the following code in the function
-------------------------------
function [tiq,Isymbols,Qsymbols,sumiq]= qpsk(N)
%#eml
fcarr=2e3;
%N=10;
fs=16*1e3;
Fn=fs/2;
Ts=1/fs;
T=1/N;
randn('state',0);
td=[0:Ts:(N*T)-Ts]';
data=sign(randn(N,1))';
data1=ones(T/Ts,1)*data;
data2=data1(:);
tiq = [0:Ts*2:(N*T)-Ts]';symbols(transpose)
bs1=data(1:2:length(data));
symbols=ones(T/Ts,1)*bs1;
Isymbols=symbols(:);
bs2=data(2:2:length(data));
symbols1=ones(T/Ts,1)*bs2;
Qsymbols=symbols1(:);
twopi_fc_t=(1:fs/2)*2*pi*fcarr/fs;
a=1;
phi=0;
cs_t = (a * cos(twopi_fc_t + phi));
sn_t = (a * sin(twopi_fc_t + phi));
cs_t=cs_t';
sn_t=sn_t';
si=cs_t.*Isymbols;
sq=sn_t.*Qsymbols;
sumiq=si+sq;
sumiq=.7*sumiq;
----------------------------------------------------------
But when i run this code, i get the following error
****************8
Size mismatch (size [8000 x 1] ~= size [:? x 1]).
Mismatched varying and fixed sizes indicate a probable run-time error. If this diagnostic is incorrect, use indexing to explicitly make the varying size fixed.
Function 'Embedded MATLAB Function' (#48.1177.1191), line 46, column 4:
"cs_t.*Isymbols"
*******************************
Please any one help me...
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 String 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!