Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: image in axes: making grid visible
Date: Sun, 1 Nov 2009 19:18:34 -0500
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <hcl8f5$5ub$1@fred.mathworks.com>
References: <1187742962.261037.112010@m37g2000prh.googlegroups.com> <1188012165.312218.265130@r23g2000prd.googlegroups.com> <hcgt58$sn9$1@fred.mathworks.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1257121061 6091 172.31.44.65 (2 Nov 2009 00:17:41 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 2 Nov 2009 00:17:41 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Xref: news.mathworks.com comp.soft-sys.matlab:581697



"meha " <sign2speech@gmail.com> wrote in message 
news:hcgt58$sn9$1@fred.mathworks.com...
>
>> I m converting a jpg image into binary using following code:
> g=imread('G.jpg');
> save g;
> load g;
> BW = im2bw(g,map,0.4);
> imshow(g,map), figure, imshow(BW)
>
> But in ths code, following error is coming:
> ??? Undefined function or variable 'map'.
>
> How to remove this error?

Create the variable map before attempting to use it.

-- 
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ