Writing a matrix [message #93696] |
Mon, 03 October 2016 07:24  |
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   |
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  |
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
|
|
|