help-octave
[Top][All Lists]
Advanced

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

Re: problem on bin2dec


From: Søren Hauberg
Subject: Re: problem on bin2dec
Date: Tue, 08 Aug 2006 22:06:16 +0200

Hi,
  The attached patch against 2.9.7 should solve the problem and make
Octave matlab compatible.

Søren

tir, 08 08 2006 kl. 09:53 -0700, skrev frank wang:
> Hi, 
>  
> I have a matlab code that convert binary to decimal. For example,
>  
> a=num2str([ 1 1 1 0]);
> b=bin2dec(a); 
> ans=14.
>  
> However, on Octave,
>  
> bin2dec(num2str([1 1 1 0]))
> ans = 584.
>  
> How could I fix this? My data set is quite big.
>  
> Thanks
>  
> Frank
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave

Attachment: bin2dec.patch
Description: Text Data


reply via email to

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