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?

3 ビュー (過去 30 日間)
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 .

回答 (1 件)

Aveek Podder
Aveek Podder 2018 年 2 月 20 日
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:

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by