06-17-2022 02:30 PM
Hello everyone, I would like to implement the logic described in the figure below. It is one of the steps necessary for converting a time series into a symbolic series. The image is an explanation of how the logic works, in this case the partition length is l=12. attached is the partition I want to convert using the same logic. I'm new to Labview and I'm not able to proceed with this step. Any help is welcome, thanks for your attention
06-17-2022 03:50 PM
Here's a quick, not checked for every case, solution. You may need to change the logic a bit.
06-17-2022 08:36 PM - edited 06-17-2022 08:39 PM
It worked for me, thank you very much for your help. A question, how can I convert these 6 Columns that appear in the image, to their respective decimal numbers? Thank you very much for your help, God bless you.
06-17-2022 08:59 PM
Do you want the rows converted to numbers or the columns? Is the order Little Endian or Big Endian? Why do you need the convert the boolean to numbers only to convert back? The numbers you wrote in your reply do not seems correct for any case. You can use "Boolean Array to Number" on the original array or convert the numbers to an array of booleans then "Boolean Array to Number". You may need to reverse the array depending on the endianess and/or tranpose the 2D number array if you want the columns instead of the rows.
06-17-2022 10:03 PM
Yes, you're right, I wrote the numbers in the figure to exemplify. I think I expressed myself badly, I don't need to re-convert the array to boolean. I need to convert each column of the array to a decimal value, and thus plot a graph. I will attach a figure to improve understanding. The second VI you made is quite promising. Thank you very much.
06-18-2022 01:43 AM
Your VI does not have very intuitive naming, but you already start out with a boolean array ("subarray 3") and you can operate directly on that. No need to convert to an array of 0,1.
What is the max size of the boolean array? If it is is small (i.e. less than 64), you can just convert it directly to a single numeric and generate all the derived numbers using bit shifting and masking. Would be much more efficient.
Next time you attach a VI, make sure that all controls have some typical interesting default data. Empty arrays are not interesting. 😉
06-18-2022 02:08 AM - edited 06-18-2022 02:59 AM
@altenbach wrote:
Your VI does not have very intuitive naming, but you already start out with a boolean array ("subarray 3") and you can operate directly on that. No need to convert to an array of 0,1.
What is the max size of the boolean array? If it is is small (i.e. less than 64), you can just convert it directly to a single numeric and generate all the derived numbers using bit shifting and masking. Would be much more efficient.
Here's one possibility:
06-20-2022 12:35 AM
06-20-2022 01:42 AM
It would have been nice to see the full problem you are trying to solve instead of letting us all guess wildly what the scope of the problem actually is!
So far we dealt with a 1D array input, but now you are talking about a 1000x50 "matrix" (My guess it is just a 2d array. This is not a linear algebra problem!). It is not clear at all how the two dimensions (rows, columns) relate to the original problem at all. Can you point to a paragraph in the pdf that talks about it? Why do you now use an orange array to represent zeroes and ones? That is 64 times too many bits!!!
Your new VI makes absolutely no sense! For example the first loop basically pumps hot air to just output the last value at the end (which could have been done even without a loop!)
If you have more than one dimension, you get an array of sizes, which seems to confuse you. We really need to know more. Do you want to analyze each row separately? Do you want to reshape the 2D array into one long 1D array with a size of the product of the dimensions (50k)?
06-20-2022 12:02 PM