help-octave
[Top][All Lists]
Advanced

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

Re: problem on bin2dec


From: Joe Koski
Subject: Re: problem on bin2dec
Date: Tue, 08 Aug 2006 15:12:45 -0600
User-agent: Microsoft-Entourage/11.2.5.060620

Soren,

Line 10 of the patch should read

+    print_usage();

not

+    printr_usage();

With that correction, the patch fixes the test case works for me.

Joe

on 8/8/06 2:06 PM, Søren Hauberg at address@hidden wrote:

> 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
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave





reply via email to

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