Question: question about writing data in a file

hi

I have a problem when i want to write some data on a file.

the main program is work,but when it wants to write,this error is shown:

Error,invalid input: writedata expects its 2th argument, data, to be type of {set,hfarray,list,matrix,array(1),list(list)}, but received HFloat(-0.08716693)

the program is:

restart

fd:=fopen("e:/teta.txt",read)

fg:=fopen("e:/c.txt",write)

g:=readdata(fd,3)

with(linalg)

d:=matrix(3)

for k from 0 to 8970 by 3 do

for i from 1 to 3 by 1 do

for j from 1,3 by 1 do

d[i,j]:=gi+k,j:

end do

end do

s:=eigenvalue(d):

p:=3.(s1*s2+s2*s3+s3*s1):

writedata(fg,p);

end do;

the main program work,the only problem is for writing part.the data that i want to write,all are float like 0.015482369 ...

thanks for ur help

 

 

 

Please Wait...