Page 1 of 1

Add Data Into Series

Posted: Sat Jul 15, 2017 11:22 am
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,

Re: Add Data Into Series

Posted: Sat Jul 15, 2017 1:07 pm
by TomDoan
Isn't that what the DATA instruction does?

Re: Add Data Into Series

Posted: Sat Jul 15, 2017 2:08 pm
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".

Re: Add Data Into Series

Posted: Sat Jul 15, 2017 4:15 pm
by TomDoan
Use
Data(unit=input) 1 10 pn
2 3 5 7 11 13 17 19 23 29