Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

167
Views
Append Multiple Arrays Together using VB.Net

I have a jagged array that contains 40 different arrays. Each one of them has dimensions (250, 250, 2).

I'd like to combine them all into a new array with dimensions (250 * 40, 250 * 40, 2 * 40).

Starting with the first array lbound(jagged) to the last ubound(jagged).

What is a good approach to doing this? I was thinking of simply using loop:

Dim DWG(250 * 40, 250 * 40, 2 * 40) as Double
Dim jagged(40)() as Double = GetArrays(jagged) ' get 40 arrays    
Dim arr(250, 250, 2) as Double

for i = 0 to ubound(jagged)        
    arr = jagged(i)
    for channel = 0 to ubound(arr, 3) 
        for row = 0 to ubound(arr, 1) 
            for column = 0 to ubound(arr, 2) 
                DWG(row + (250 * i), column + ( 250 * i), channel + (2 * i)) = arr(row, column, channel)
            next
        next
    next
next        

I can confirm the above code works. Still seems like there could be a better approach. Just for a little context I'm editing pixel data.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!