LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiplicate by is own each element of a vector

Hello!
 
I have a vector and i want to multiplicate each element by his own. For example:
 
a=[2 4 6]  i want to obtain  b=[4 16 36]
 
I don't want to use for loops.....I've searched some block in matrix menu but I couldn't find the good solution.
 
What i have to do to obtain this result as a operation between matrix without using a a for loop. There is some block to make this operation?
 
Thanks in adavance
 
Michael
0 Kudos
Message 1 of 3
(2,392 Views)
Hi Michael
 
This is what you are looking for.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 2 of 3
(2,387 Views)
hi
 
Just go ahead and multiply the array wit itself as shown in the attached VI
 
it will give the desired result
 
regards
Dev
 
Message 3 of 3
(2,381 Views)