Question: Using fprintf to write a vector with N arbitrary dimension

Hello,  how can i  to adapt the  commands  below  to write  in fprintf a vector with  N components.

 

 fd≔fopen("temp_file",WRITE);

fprintf(fd,"x = %d, y = %g",x,y)

fclose(fd)  

For exemple: Given a vector (or list)  v:=[1,2,3,4,....N], i would like to get  a file with  N column and 1 line, where N is a integer number, which i will give.

Thanks for any help.

 

 

Please Wait...