0
Hello, I’m trying to run a power flow program (electrical engineering). The routine works perfectly if the bar number vector is of type:
A=[1;2;3;4;5;6;7;8]
The problem is that I come across vectors of the type:
B=[1;2;7;8;9;15;16;17]
One solution I was thinking of was to correlate the vector 'B' (which occurs) with the vector 'A' (created during the routine). The problem is that: once the program runs and converges, I need to have the results as a function of vector 'A' and not auxiliary vector 'B', so this correlation cannot be lost.
My best idea is to create an array where column 1 is vector A and column 2 is vector B. Is there any better way to do this?
What do you call "random vector"? For me
B
is in the same ordination asA
: nondecreasing– Jefferson Quesado
I necessarily need the vector to start at 1 and end at N (where N is the last bar). Hence the creation of an auxiliary vector.
– AmbroSavior
You need a vector of consecutive numbers started at 1?
– Jefferson Quesado
Exactly! And I can’t lose the correlation with vector A (disordered) in the case.
– AmbroSavior