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?

2 visualizaciones (últimos 30 días)
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 .

Respuestas (1)

Aveek Podder
Aveek Podder el 20 de Feb. de 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:

Categorías

Más información sobre Graph and Network Algorithms en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by