help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

just for the sake of curiosity ...


From: Dr.-Ing. Dieter Jurzitza
Subject: just for the sake of curiosity ...
Date: Sat, 18 Jun 2016 12:22:23 +0200
User-agent: KMail/4.14.10 (Linux/4.1.21-15.2-default; KDE/4.14.18; x86_64; ; )

Dear listmembers,
after solving my issues with fprintf() by your help in a very elegant manner 
(Thanks again!) I was thinking about a similar way for fscanf().

I had had asked about something like

X,Y=fscanf (infile, "%f %f");

given that "infile" points to a file with two consecutive columns of say 
double values. I was recommended to use "textread" instead what actually 
solved my problem. 

However, given that

fprintf(oufile, "%f %f\n", (X;Y));

would actually solve the "write" side of writing two vectors to a file, I 
thought of a similar attempt to solve this for fscanf, say

[(X;Y)]=fscanf (infile, "%f %f");

but this does not work that way. Any ideas? As readily mentioned, this is only 
for the sake of curiosity, textread does the job ...

Thank you very much,
take care





Dieter Jurzitza

-- 
-----------------------------------------------------------

                               |
                                \
                 /\_/\           |
                | ~x~ |/-----\   /
                 \   /-       \_/
  ^^__   _        /  _  ____   /
 <°°__ \- \_/     |  |/    |  |
  ||  ||         _| _|    _| _|

if you really want to see the pictures above - use some font
with constant spacing like courier! :-)
-----------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]