LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

multyplying pervious value of iteration to current value

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

0 Kudos
Message 1 of 4
(6,549 Views)

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)

0 Kudos
Message 2 of 4
(6,545 Views)

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 george
0 Kudos
Message 3 of 4
(6,538 Views)
Probably related to this thread....
0 Kudos
Message 4 of 4
(6,518 Views)