GPS GUI in Matlab
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ugue Halden
le 25 Avr 2016
Réponse apportée : Vaibhav Awale
le 2 Mai 2016
I need to design a GUI which has to show 2 plots ( plot1=gps coordinates with plot_google_maps function, plot2=accelerometer values with respect to time. )
Here is the GUI i designed:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/162465/image.png)
When i run the .m file, it automatically plots the gps data to axes3, but i need it to plot axes 1 and acc_z values to axes3. Are there anyways to do that?
Here is the picture after i press Run Google_Maps:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/162472/image.png)
P.s: I uploaded my .m file, i didn't intended to copy-paste the code to here because it is kinda long.
Any kind of help is appreciated.
0 commentaires
Réponse acceptée
Vaibhav Awale
le 2 Mai 2016
Hi Ugue,
You need to specify the axes where you want to plot the figure. Right now, since you have not specified any axes to plot to, it plots to the "current axes" and current axes in your case is "axes3". Hence it plots both accelerometer data and GPS data in same plot. To rectify this, you can specify the axes that you want to plot to in the "scatter" function and in plot_google_map function.
The axes can be specified by making use of "handles" structure in the GUI. I have attached an example in which I am using following syntax to plot to a specific axes:
scatter(handles.axes1, sin(0:0.1:2*pi),cos(0:0.1:2*pi)); %To plot to axes1
plot(handles.axes2, cos(0:0.1:2*pi)); % To plot to axes2
I hope this answers your question.
Regards,
Vaibhav
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Graphics Performance dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!