This widget could not be displayed.
This widget could not be displayed.

LabVIEW

This widget could not be displayed.
cancel
Showing results for 
Search instead for 
Did you mean: 

urgent help on array

Hi

 

I want to Sort an array elements with help of Row 0 in the order of another array.

 

Thanks

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 1 of 13
(4,482 Views)

Hi nitya,

  Please try to use the mathscript node with command as [c,d]=sort(a,b) where a is a matrix/2-d array and b=0/1 where 1-sorts matrix by row and 2-sorts matrix by column.Please check.

 

 

thanks and regards,

srikrishnaNF

Regards,
Srikrishna


This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 2 of 13
(4,474 Views)

hi

 

 

I have'nt used math script can u post me the code pls.

 

Thanks

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 3 of 13
(4,472 Views)

Is there any other way apart from using math script ??

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 4 of 13
(4,470 Views)

Hi Nitya,

  Can you please reattach your Vi ,i could not able to download it..

 

THanks and regards,

srikrishnaNF

Regards,
Srikrishna


This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 5 of 13
(4,466 Views)

Hi

 

please find the attachment

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 6 of 13
(4,457 Views)

Hi nitya,

  If you install openg toolkits,you will get one function by name sort array which can sort 2-d arrays also either ascending ro descending,row or column wise..I attached the same vi(version 2009)..Find it in the attachments.

 

 

Thanks and regard,s

srikrishnaNF

Regards,
Srikrishna


This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 7 of 13
(4,438 Views)

Hi SriKrishna

 

I'll check it out.

 

Thanks

 

 

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 8 of 13
(4,432 Views)

 


@Nithyamv wrote:

please find the attachment


 

Sorry, the text:

"The values alone in the Refix array should be replaced in the orginal array with referance to row 0 in original array.

The Row 0 is default only the corresponding values should be picked up from refix and should be placed it in the original."

 

Is incomprehensible to me. 😞

 

Could you add a third array to the front panel that shows what kind of result you actually want?

 

For example if the original array is:

 

B1  B2 B11  B9

 1   z   z   z

 0   z   z   z

 1   z   z   z

 

And the refix array is:

 

B9 B11  B2  B1

 2   2   2   2

 2   2   2   2

 2   2   0   2

 

What would the desired result look like?

 

The values alone in the Refix array should be replaced in the orginal array with referance to row 0 in original array.
The Row 0 is default only the corresponding values should be picked up from refix and should be placed it in the original.The values alone in the Refix array should be replaced in the orginal array with referance to row 0 in original array.The Row 0 is default only the corresponding values should be picked up from refix and should be placed it in the original."

 

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 9 of 13
(4,423 Views)

The result should be

B1  B2 B11  B9

 2   2   2   2

 2   2   2   2

 2   0   2   2 

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 10 of 13
(4,418 Views)