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.



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


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...