help-octave
[Top][All Lists]
Advanced

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

Re: checkerboard Function in octave


From: Andy Buckle
Subject: Re: checkerboard Function in octave
Date: Thu, 29 Nov 2012 08:24:27 +0000




On 29 November 2012 07:56, Sivahari Nandakumar <address@hidden> wrote:
Hi list,
function checkerboard is not available in octave.  This is available in matlab. Is there any alternative for this function.

>bw=repmat([0 1],1,4)
bw =

   0   1   0   1   0   1   0   1

>wb=repmat([1 0],1,4)
wb =

   1   0   1   0   1   0   1   0

>im=repmat([bw; wb],4,1)
im =

   0   1   0   1   0   1   0   1
   1   0   1   0   1   0   1   0
   0   1   0   1   0   1   0   1
   1   0   1   0   1   0   1   0
   0   1   0   1   0   1   0   1
   1   0   1   0   1   0   1   0
   0   1   0   1   0   1   0   1
   1   0   1   0   1   0   1   0

>imshow(im)

this works for me in Octave 3.6.2 (MSVC)

--
/* andy buckle */

reply via email to

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