octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #49830] xlsread difference vs. matlab


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #49830] xlsread difference vs. matlab
Date: Tue, 13 Dec 2016 18:01:51 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40

Update of bug #49830 (project octave):

                Category:    Octave Forge Package => None                   
                Severity:              3 - Normal => 1 - Wish               
                  Status:                    None => Postponed              
                 Release:                   4.2.0 => other                  

    _______________________________________________________

Follow-up Comment #1:

IMO returning NaNs for empty cells using xlsread is a stupidity of Matlab
caused by legacy behavior inherited from old Excel versions. TTBOMK earlier
versions of matlab used to return yet other bit patterns than NaN.

I think you can get similar results by using this:

xls = xlsopen ('test1.xlsx');
c = xls2oct (xls, 'restrictions','c2:f7', struct ('strip_array', 0));
xls = xlsclose (xls);
[a, b] = parsecell (c);

No NaNs yet but empty cells. To get NaNs you'd do:

c(cellfun (@isempty, c)) = NaN;

Or, you can use the fourth return arg of xlsread to fix up c (type "help
xlsread")

I'm (yet) not quite in favor of "fixing" this.

Setting status => postponed and lowering priority

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49830>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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