I am working on a project which requires geodata logging via Matlab, I want it to plot big red dots when acceleration on z-axis goes above 410, and plot normal size blue dots when acc_z value is below 410. I am using plot_google_map function for plotting google maps image.
Here is my code:
lat = [48.8708 51.5188 41.9260 40.4312 52.523 38.274179];lon = [2.4131 -0.1300 12.4951 -3.6788 13.415 27.074541]; acc = [333 327 405 ; 334 327 440 ; 327 323 412 ; 325 321 425; 325 320 430; 400 400 400];acc_z=acc(:,end);i=1:length(lat);k=1:length(lon);j=1:length(acc_z);raw_data=[lat ;lon ;acc_z'];raw_data_acc=raw_data(3,:);for m=1:length(j) if (raw_data_acc(j))>410 plot(lon,lat,'.r','MarkerSize',40) hold on else plot(lon,lat,'.b','MarkerSize',20) end end plot_google_map
and here is my plot:
as you can see 2nd,3rd,4th and 5th dots must be big,red. But unfortunately i am not able to plot them as i want.
Any kind of help is appreciated.
Best Answer