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

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

[Octave-bug-tracker] [bug #48013] Java integration: conversion to double


From: Ernst Reissner
Subject: [Octave-bug-tracker] [bug #48013] Java integration: conversion to double
Date: Sat, 20 Aug 2016 20:18:53 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0

Follow-up Comment #24, bug #48013 (project octave):

Ok, I reproduced the result. 
I also obtain 

octave:22> rawarr = ods2oct (ods, 1)
rawarr = 
{
  [1,1] =
<Java object: java.math.BigDecimal>
  [2,1] =
<Java object: java.math.BigDecimal>
  [1,2] =
<Java object: java.math.BigDecimal>
  [2,2] =
<Java object: java.math.BigDecimal>
}

but then 

octave:32> cellfun(@double,rawarr) 
ans =
   1.0000   2.0000
   1.5000   2.5000


Ok, I cannot figure out why cellfun turns the cellarray into a matrix, but
application of function double does the work. 
This is what the io-package should do when creating rawarr 
and which was not necessary until now. 



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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