turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- How to specify a number array

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Nov 20, 2015 9:42 AM
(746 views)

Hello Guys,

I want to specify a number array from 1 to 100.

Right now I am doing it in the following way.

sel[1] = {"1", "2", "3", "4", .....continued upto "100"};

But this method is very cumbersome as I have to type in all numbers up to 100. Is there any shorter way in which I can tell JMP that I mean all numbers from 1 to 100.

Thanks

2 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Nov 20, 2015 12:19 PM
(656 views)

To get a matrix of 100 values going from 1 to 100:

a_matrix = 1::100;

To convert this to a list:

a_list = as list(a_matrix)[1];

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Nov 20, 2015 1:28 PM
(656 views)

Your example shows a list of numbers within quotation marks, i.e. text-formatted numbers. If that's what you need, this formula would do it:

Local**({**i = **0****}**, Repeat**({**i++; Char**(**i**)}**, **100****))**;