comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Writing a matrix
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Writing a matrix [message #93696] Mon, 03 October 2016 07:24 Go to next message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
Folks,
Hi,
I am writing a matrix like this:
.....
openw, 1, 'for_test20.txt'
writeu, 1, copol
close, 1
.....

but it appears like this:

ÀX
í¿ €©Ÿñ¿ `ö@ô¿ À…ƒö¿ L}ø¿  +<ú¿ àHËû¿ @p1ý¿ `2 À `ãHÀ  IÀ €á#À €©ßÀ @(„À @HÀ àܘÀ @®
À ÀºxÀ `,ÚÀ  ‘3À À¡…À ÀðÑÀ ZÀ  ¬ÑÀ àÈ< À ê› À •ñ À @.?


Can someone please help me?
All the best,
Cheers,
Dave
Re: Writing a matrix [message #93697 is a reply to message #93696] Mon, 03 October 2016 07:29 Go to previous messageGo to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Monday, October 3, 2016 at 4:24:21 PM UTC+2, dave poreh wrote:
> Folks,
> Hi,
> I am writing a matrix like this:
> .....
> openw, 1, 'for_test20.txt'
> writeu, 1, copol
> close, 1
> .....
>
> but it appears like this:
>
> ÀX
> í¿ €©Ÿñ¿ `ö@ô¿ À…ƒö¿ L}ø¿  +<ú¿ àHËû¿ @p1ý¿ `2 À `ãH À   I À €á# À €©ß À @(„ À @H À àܘ À @®
> À Àºx À `,Ú À  ‘3 À À¡… À ÀðÑ À Z À  ¬Ñ À àÈ< À ê› À •ñ À @.?
>
>
> Can someone please help me?
> All the best,
> Cheers,
> Dave

You just wrote a data file, not a text file.

from the help:
The WRITEU procedure writes unformatted binary data from an expression into a file. This procedure performs a direct transfer with no processing of any kind being done to the data.

Try using printf if you want text format.

Cheers,
Helder
Re: Writing a matrix [message #93701 is a reply to message #93697] Mon, 03 October 2016 23:53 Go to previous message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
Thanks Helder,
Yes I saw it now...
Cheers,
Dave


On Monday, October 3, 2016 at 3:31:12 PM UTC+1, Helder wrote:
> On Monday, October 3, 2016 at 4:24:21 PM UTC+2, dave poreh wrote:
>> Folks,
>> Hi,
>> I am writing a matrix like this:
>> .....
>> openw, 1, 'for_test20.txt'
>> writeu, 1, copol
>> close, 1
>> .....
>>
>> but it appears like this:
>>
>> ÀX
>> í¿ €©Ÿñ¿ `ö@ô¿ À…ƒö¿ L}ø¿  +<ú¿ àHËû¿ @p1ý¿ `2 À `ãH À   I À €á# À €©ß À @(„ À @H À àܘ À @®
>> À Àºx À `,Ú À  ‘3 À À¡… À ÀðÑ À Z À  ¬Ñ À àÈ< À ê› À •ñ À @.?
>>
>>
>> Can someone please help me?
>> All the best,
>> Cheers,
>> Dave
>
> You just wrote a data file, not a text file.
>
> from the help:
> The WRITEU procedure writes unformatted binary data from an expression into a file. This procedure performs a direct transfer with no processing of any kind being done to the data.
>
> Try using printf if you want text format.
>
> Cheers,
> Helder
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: high rise building extraction from satellite image
Next Topic: I would like to average the first n columns based on duplicate values of the n+1th column

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 07:23:41 PDT 2025

Total time taken to generate the page: 0.00602 seconds