Sort2DArray for SortNArray

Questions about MultiCharts and user contributed studies.
strelow

Sort2DArray for SortNArray

Postby strelow » 09 Oct 2014

Hello

I trying to sort matrix with more than 2 dimensions but this function only works with 2 . There is any other function that could help. I´m thinking make compare 6 columns matrix .

Maybe combination of 2 by 2 and restore my big matrix but for this I need compare like this :

If Instrument_Name1 = Instrument_Name2 then M2[0,idx]= M1[0,idx]

Is possible do string comparison in easy language ?


Thanks for help.

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Sort2DArray for SortNArray

Postby JoshM » 09 Oct 2014

Is possible do string comparison in easy language ?
An example of some string keywords:

Code: Select all

Variables:
stringA(""),
stringB("");

once begin

stringA = "String comparison possible?";
stringB = "string Comparison Possible?";

condition1 = stringA = stringB;

Print("Are stringA and B identical? ", condition1);

// Prints: Are stringA and B identical? FALSE


condition2 = LowerStr(stringA) = LowerStr(stringB);

Print("Are both strings in lower case identical? ", condition2);

// Prints: Are both strings in lower case identical? TRUE


condition3 = InStr(LowerStr(stringB), "string") <> 0;

Print("Does the word 'string' occur in stringB? ", condition3);

// Prints: Does the word 'string' occur in stringB? TRUE


condition4 = StrLen(stringA) = StrLen(stringB);

Print("Are stringA and stringB of the same length? ", condition4);

// Prints: Are stringA and stringB of the same length? TRUE

end;
For more info on strings, see text manipulation.

strelow

Re: Sort2DArray for SortNArray

Postby strelow » 09 Oct 2014

thanks JoshM

And about Sort Array do you know something for matrix higher than 2 dimension ?

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Sort2DArray for SortNArray

Postby JoshM » 10 Oct 2014

And about Sort Array do you know something for matrix higher than 2 dimension ?
Not that I could find. Perhaps another user can help; otherwise, you probably have to make it yourself.


Return to “MultiCharts”