Add Data Into Series

For questions and discussion related to reading in and working with data.
abi
Posts: 74
Joined: Sat Apr 13, 2013 3:48 am

Add Data Into Series

Unread post by abi »

Hello,
Is it possible to add data into a series (one-dimensional array) without using Data Editor (like "input" instruction in a two-dimensional array)?

Thanks,
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Add Data Into Series

Unread post by TomDoan »

Isn't that what the DATA instruction does?
abi
Posts: 74
Joined: Sat Apr 13, 2013 3:48 am

Re: Add Data Into Series

Unread post by abi »

Hi Tom,

Actually i don't know, i want to create a series including ten first Prime number by using:

dec series[real] pn
clear(zeros,length=10)
set pn = 3, 5, 7, 11, 13 ,17, 19, 23, 29, 31

but it give me only "31".
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Add Data Into Series

Unread post by TomDoan »

Use
Data(unit=input) 1 10 pn
2 3 5 7 11 13 17 19 23 29
Post Reply