01-21-2009 05:15 PM
Dear Sir/Madam,
After somedata processing i am getting the output on a single line(i mean a single wire... the data comes out ) in the following format
msblsb.....msblsb.....msblsb....etc..i want to multiply the msb with 16 and then add it to the lsb ..and then finally print the result
could any one of you be able to help me?
many thanks in advance
have a niece day!
regards,
thomas george
01-21-2009 07:33 PM
Hi,
I am not fully understand your problem. I guess that you want to multiply the odd elements with 16 and then add them to the even elements. Please try the following script.
a = 1:10
a = a(1:2:end)*16+a(2:2:end)
01-22-2009 12:26 AM
Dear Sir/Madam,
THANKS FOR THE REPLY
What i need is for example if 1 comes out first and 3 comes out next,then the result should be 16*1+3 ,but since i am using the sound card for reading data it doesnt allow me to use timers ,as soon as i use timing control it stops reading
THANKING YOU ONCE AGAIN
have a niece day
with regards,
thomas george01-23-2009 01:00 AM