help-octave
[Top][All Lists]
Advanced

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

Re: Help about the "fscanf" function; differnces between MATLAB and OCTA


From: c.
Subject: Re: Help about the "fscanf" function; differnces between MATLAB and OCTAVE
Date: Fri, 13 Apr 2012 17:55:03 +0200

On 13 Apr 2012, at 17:32, _Pascal wrote:

> Hi all,
> [I am a very beginner with OCTAVE...]
> I have an issue with the function /fscanf/. *Running the same script .m file
> with Octave and Matlab does not produce the same results :-(*.
> 
> Joined in the attached .zip file 
> http://octave.1599824.n4.nabble.com/file/n4555196/curv_debug.zip
> curv_debug.zip :
> - /script_a_lancer.m/ : the script to be runned (which calls
> /read_sfc_simple.m/)
> - /read_sfc_simple.m/ is the function containing instructions where
> /fscanf/ is called
> *It is a very short function: only 8 very short lines of code* (could you
> please have a look on it?)
> 
> - Main_Surf.txt (the file that /read_sfc_simple.m/ should read)
> - Resultats_avec_OCTAVE.png: the results obtained with OCTAVE: *z is a
> column-vector of 1099 rows*
> - Resultats_avec_MATLAB.png: the results obtained with MATLAB: *z is a
> column-vector of 40401 rows*
> 
> Results obtained with MATLAB are the correct ones. My question: why OCTAVE
> gives differents results?
> Could you suggest me how to modify my code to obtain the same results with
> both MATLAB and OCTAVE ?
> 
> Best Regards
> Pascal

On my system I get the same result as you expect with both Octave 3.6 and 3.7

>> version
ans = 3.6.0-rc1
>> script_a_lancer
size_z =

   40401       1

>> 


>> version 
ans = 3.7.0+
>> script_a_lancer
size_z =

   40401       1

>> 

Maybe this is a windows-only problem? can any windows user confirm the issue?

c.

reply via email to

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