a weird problem with trip.

32 views
Skip to first unread message

laya

unread,
May 19, 2011, 5:30:41 AM5/19/11
to trip-support
I've started using TRIP just today, my operating system is linux:
ubuntu,
I created a simple .t file to test TRIP's abilities as follows:
x=-pi,pi,pi/108;
y=sin(x);
vnumR Imy;
resize(Imy,217,0)
ff=file_fullname("test-data.txt");
write(ff,"%20.15E %12.8E\n",y,Imy);
naf(216,ff,naft1,pi/108,-pi,1,2);

when I ran it this message was shown:

> include("naff-test1.t");
TRIP[ 5 ] : Syntax error
Command :' ff=file_fullname("test-data.txt");'
^^
at line 5 in file '/home/golchin/naff/trip/naff-test1.t'

the weird is that, when I just copy and pasted the command in the
shell nothing was wrong with it:

>ff=file_fullname("test-data.txt");
ff = file name 'test-data.txt'
>

do any body have an explanation for this?

Mickael Gastineau

unread,
May 19, 2011, 5:40:02 AM5/19/11
to trip-support
You omit to add a semi-column on this line : resize(Imy,217,0)
And you forget to add the number of terms in the naf command. (here I
set 10 terms).

So the script becomes :

x=-pi,pi,pi/108;
y=sin(x);
vnumR Imy;
resize(Imy,217,0);
ff=file_fullname("test-data.txt");
write(ff,"%20.15E %12.8E\n",y,Imy);
_naf_nulin=0;
naf(216,ff,naft1,pi/108,-pi,10, 1,2);



A better way is use the naftab command when numernical vectors are
already existing.

Mickaël

laya

unread,
May 19, 2011, 6:07:59 AM5/19/11
to trip-support
thanks, it's very kind of you you answered me so fast.
Reply all
Reply to author
Forward
0 new messages