The core of my problem is that I have to work with arrays of different lengths, decided to use a class variable. Yet, I cannot automate the change between the subclasses (see code: U1..U3). Is there a way to do so? If not, is there another way to work with a 2D matrix where the number of rows is changing from column to column? With Matlab background, I also tried "Application.Evaluate" without success. Every help is appreciated.
Option Base 1
Option Explicit
Public Type UnitT
U1() As Double
U2() As Double
U3() As Double
End Type
Dim Resu() As UnitT
Sub test()
Dim Nul() As Variant, ArrayIn() As Double, i As Integer
Nul = [{5,10,15}]
ReDim Resu(2, 1)
For i = 1 To 2
ReDim Resu(i, 1).U1(Nul(i))
Next i
'that would be the idea or something similar
'ReDim Resu(2, 1)
'For i = 1 To 2
' For j = 1 To 3 ' Ubound(U1..U3)
' ReDim Resu(i, 1).U(j)(Nul(i))
' Next j
'Next i