MCode Block Problem

M

mah@k-space.org

Guest
HELLO
I want to use the below function to the xilinx system generator MCod
Block, but I faced some errors . how to solve this problem.The cod
executed well in matlab but when I used MCode Block it gave me errors.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%the function is:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function s=dyn_focusing(RF,Lin)
prec = {xlSigned, 16, 0, xlRound, xlWrap};
persistent m, m=xl_state(zeros(1,len),prec);
s=m;
len=512;
for k=1:len
if Lin(k)<=len
s(k)=RF(1,Lin(k));
if Lin(k)>len
s(k)=0;
end
end
end
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
where RF and Lin are (1X512) array



---------------------------------------
Posted through http://www.FPGARelated.com
 
"mah@k-space.org" <mah@n_o_s_p_a_m.k-space.org> writes:

HELLO
I want to use the below function to the xilinx system generator MCode
Block, but I faced some errors . how to solve this problem.The code
executed well in matlab but when I used MCode Block it gave me errors.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%the function is:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function s=dyn_focusing(RF,Lin)
prec = {xlSigned, 16, 0, xlRound, xlWrap};
persistent m, m=xl_state(zeros(1,len),prec);
s=m;
len=512;
for k=1:len
if Lin(k)<=len
s(k)=RF(1,Lin(k));
if Lin(k)>len
s(k)=0;
end
end
end
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
where RF and Lin are (1X512) array
It might help us to help you if you tell us what errors you get!

Cheers,
Martin

--
martin.j.thompson@trw.com
TRW Conekt - Consultancy in Engineering, Knowledge and Technology
http://www.conekt.co.uk/capabilities/39-electronic-hardware
 

Welcome to EDABoard.com

Sponsor

Back
Top