Embedded matlab function error..

조회 수: 1 (최근 30일)
Sriharsha
Sriharsha 2012년 2월 8일
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개)

카테고리

Help CenterFile Exchange에서 Configure and View Diagnostics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by