geoshow('landareas.shp', 'FaceColor', [0.5 1.0 0.5]);
hold on;
plot(0,0,'r*');
axis on;
and also,i want to use a world map(jpeg file) instead of geoshow worldmap.I used imread and read the jpeg file.then how can to set the lat and long for the image for the same application?
Those Commands are follows,
map=imread('WorldMap.jpg');
image(map);
Thanks in Advance,
Jo.
"jothi " <jothi...@gmail.com> wrote in message
news:imdqj4$m2b$1...@fred.mathworks.com...
> Hi to all,
> I am Learning the Matlab and doing some applications.I Did a GUI.It should
> locate a place in a world map using lat and long values.I used geoshow
> command.when ever i am running the commands from command window. it's
> working properly.But it is not working in the m-file.
Define "not working." Does it warn? Does it error? If so, what is the
FULL text of the message? Does it give you a result other than what you
expect? If so, what result do you expect and what result do you receive?
--
Steve Lord
sl...@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
Thank U for ur reply.here not Working means it shows the geo map in particular axes,But it's not plotting lat long values in the same map.Even it's not given any warning or error also.I think i changed some modification in axes properties with out my knowledge.Any have i deleted that axes and i created a new axes and given the same commands ,and it given some errors.
COMMANDS:
geoshow('landareas.shp')%, 'FaceColor', [0.5 1.0 0.5]);
axis on;
hold on;
plot(Long1,Lat1,'r*');
Errors:
??? Error using ==> plot
Invalid first data argument
Error in ==> EQ_Monitor>pushbutton1_Callback at 360
plot(Long,Lat,'r*');
Error in ==> gui_mainfcn at 95
feval(varargin{:});
Error in ==> EQ_Monitor at 42
gui_mainfcn(gui_State, varargin{:});
??? Error using ==> EQ_Monitor('pushbutton1_Callback',gcbo,[],guidata(gcbo))
Error using ==> plot
Invalid first data argument
??? Error while evaluating uicontrol Callback
But i am not sure Deleted the axes , it's correct or not,But i got the output.Now the GUI locating lat and long values in geoshow map. Can u please say it's right or wrong?
these are commands.,i added str2num conversion to avoid the errors.Now i got the output.But that method is right or wrong?
geoshow('landareas.shp')%, 'FaceColor', [0.5 1.0 0.5]);
axis on;
hold on;
Long1=str2num(Long); %%these values are read from a text file.So i given this conversion.
Lat1=str2num(Lat);
plot(Long1,Lat1,'r*');
Thanks,
Jo