help-octave
[Top][All Lists]
Advanced

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

Re: Undefined mat2gray


From: Andy Buckle
Subject: Re: Undefined mat2gray
Date: Tue, 10 Apr 2012 16:51:05 +0100

On 10 April 2012 16:34, Olli Alatalo <address@hidden> wrote:
> I've got the following piece of code
>
> function A=noise(i, j)
> A=round(unifrnd(0,255,i,j));
> B=mat2gray(A);
> imshow(B);
> figure();
> imhist(B);
> figure();
> pause(4);
>
> when I run it, I receive an error:
>
> error: `mat2gray' undefined near line 3 column 3

Looks like you are trying Matlab code in Octave. There is a mat2gray
function in the image package, which might be compatible with
Matlab's. Depending on what platform you are using.

pkg install -forge image

might solve your woes.

-- 
/* andy buckle */


reply via email to

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