[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help octave
From: |
niles |
Subject: |
Re: help octave |
Date: |
Fri, 30 Jun 95 10:13:48 -0400 |
>Can anyone help me with using "fscanf".
Sure, first it's fscanf not "fscan", but I assume
you knew that. Try:
>kk = fopen("num","r");
>frewind(kk)
>k = fscanf(kk,"pp = %f")
k = 898
>k = fscanf(kk,"\nuiu = %f") % Newline char. added.
k = 8990
There a newline character in there you forgot about.
Also, doesn't it seem a bit redundent to say "pp = 898" in your data
file and then read it looking for that exact string? Why not just put
898 in the file?
Hope this helps,
Rick Niles.