I have a graph each time when I run according to the random number it will generate a new graph(TIME&VELOCITY) .Now I want to save each graphs time and velocity in order to upload and use it to other program .How should I do it?

1 visualizzazione (ultimi 30 giorni)
presently I am uploading this data to generate a graph
load('UDDS.mat');
% Get velocity and acceleration
vel = UDDS.Data;
time =UDDS.Time;
Simulteously ,I also use a random number to build a graph.If I generate more than one time I am getting a clumsy graph .As,it generate different graph for each run .first thing I should do is to see the graph clearly which is generated first ,second ,third so on.Next,I have to save the data of each graph in time and data .
plot(generated_cycle,'r')
xlabel('time steps(s)')
ylabel('velocity (km/h)')
%legend('original','stochastic')
I have attached my pic of clumsy graph below .

Risposte (1)

Aveek Podder
Aveek Podder il 20 Feb 2018
Hi,
You can use 'gca' command to get the axis properties of a figure and access its children (line) properties like XData and YData. You can save this data for future use. For more information please have a look at the following links:

Categorie

Scopri di più su Specifying Target for Graphics Output in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by