Jump to content

Resize 2D array


jbrohan

Recommended Posts

Resize 2D array

Inputs an array as Variants and outputs Variant Numeric String and Boolean arrays containing the original and expanded or contracted to the requested size.

I would be interested in the comments of LV people as to whether this is a viable approach to polymorphism. The input array is converted to the output types at some considerable computational effort. However in a user interface situation programmer convenience (IMHO) greatly outweighs the time lost in execution.Download File:post-230-1133113101.zip

Link to comment
Resize 2D array

Inputs an array as Variants and outputs Variant Numeric String and Boolean arrays containing the original and expanded or contracted to the requested size.

I would be interested in the comments of LV people as to whether this is a viable approach to polymorphism. The input array is converted to the output types at some considerable computational effort. However in a user interface situation programmer convenience (IMHO) greatly outweighs the time lost in execution.Download File:post-230-1133113101.zip

hi,

I guess you already know that you need LV Pro to create "real" polymorphic VI's

and that this is a way to do something similar.

This solutions seems to be rather memory-intensive, especially when using large arrays,

because you create 4 different arrays out of 1 variant array.

About your implementation:your performance/readability will improve if you would use

the "Get TDEnum from Data" from the OpenG-toolkit. It just gives you the datatype of the variant.

I haven't had the time yet to inspect what you are doing in the remove trailingzeros,

but I know that when using a general expression like e.g. 0*$ and then removing the last point

if the number appears to be an integer results in much more readable code.

GrtZ, tnt

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.