Re: write_matrix output nothing but zeros

From: Wang Wenshan <mswangws_at_nyahnyahspammersnyahnyah>
Date: Sun Apr 04 2010 - 10:28:59 MDT

Hi,

I finally got what was wrong. It is that I used "4f7.2" to be the format
string while output a array of integers. I changed the type of the data.
Then it works perfectly.

The most common format code letters are:
   A - text string
   D - double precision numbers, exponent notation
   E - real numbers, exponent notation
   F - real numbers, fixed point format
   I - integer
   X - horizontal skip (space)
   / - vertical skip (newline)

Hope this will help.

Wang Wenshan

> Dear editors,
>
>
>
> I am using write_matrix to output some of the info. about missing
> data to a ascii file but the file shows nothing but zero zero zero.
>
> I checked the variable written into the ascii file. It is OK. The
> results are right when I print it . whats more, when I use
> asciiwrite to output only one column, the result is right also.
>
> I used this function (write_matrix) before. It works well. And I
> compared the two commands files but didnt find any difference.
>
> So what else could this be?
>
> Here is part of my script. And I am using Version 5.1.1 on cygwin.
>
>
>
> ;=====================================================================
> ============================================
>
> txt_miss_temp(:,0)=site_1d
>
> txt_miss_temp(:,1)=yea_1d
>
> txt_miss_temp(:,2)=OHM_1d
>
> txt_miss_temp(:,3)=ndtooned(miss_temp)
>
>
>
> ;print("site= "+txt_miss_temp(:,0)+" yea=
> "+txt_miss_temp(:,1)+" OHM= "+txt_miss_temp(:,2)+" num=
> "+txt_miss_temp(:,3))
>
>
>
> ; write into a txt file
>
> opt=True
>
> opt@fout="txt_miss_temp.txt"
>
> write_matrix(txt_miss_temp, "4f10.2", opt)
>
>
>
> ;filo="miss_test.txt"
>
> ;asciiwrite(filo, txt_miss_temp(:,3))
>
> ;=====================================================================
> ============================================
>
>
>
> Thank you for your time.
>
>
>
> Best,
>
> Wang Wenshan
 

__________ Information from ESET Smart Security, version of virus signature
database 4998 (20100404) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Apr 4 10:29:22 2010

This archive was generated by hypermail 2.1.8 : Wed Apr 07 2010 - 07:12:50 MDT