Jump to content

2d to 1d Array Conversion


Recommended Posts

Dear All

In my mueasurement file i have two columns. First column has the value of the variable and second column has the number of times that value occurs in measurement. e.g

Value-----# of times

2--------------3

4--------------1

3--------------2

Values in both clumns are not sorted and re arbitrary.

Based on this example i want to generate a 1 D array which has the value in Column 1 repeated number of times in the second column. The above example will then become a 1 d array as follows.

2

2

2

4

3

3

At average there are 5000 measurements in one file.

Can you please help.

Thanks

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.