cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
SG
SG
Level III

Append Data to End of Array

I am having issues appending data to the end of an array. I have been using the concatenate operator (||), but then the result is a matrix which messes up the calculations I am working on. Is there an easy way to do this?

 

Example:

// Sample data set
data1 = [1, 2, 3, 4, 5];
data2 = [6, 7, 8, 9, 10];

result = data1 || data2;

/* output of result:
[1 6,
2 7,
3 8,
4 9,
5 10] */

// desired result: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Append Data to End of Array

Change your concatenation to:

result = data1 |/ data2;

BTW....in JSL terms, you do not have an "Array", you have a "Matrix"

Jim

View solution in original post

3 REPLIES 3
Jeff_Perkinson
Community Manager Community Manager

Re: Append Data to End of Array

Try the V Concat() operator which is |/.

https://www.jmp.com/support/help/Matrices.shtml


-Jeff
txnelson
Super User

Re: Append Data to End of Array

Change your concatenation to:

result = data1 |/ data2;

BTW....in JSL terms, you do not have an "Array", you have a "Matrix"

Jim
SG
SG
Level III

Re: Append Data to End of Array

Thanks guys that's exactly what I needed!

Recommended Articles