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 views (last 30 days)
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 .

Answers (1)

Aveek Podder
Aveek Podder on 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:

Categories

Find more on Graph and Network Algorithms in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!