フィルターのクリア

convert time & calculate performance

3 ビュー (過去 30 日間)
Brave A
Brave A 2019 年 4 月 8 日
コメント済み: Brave A 2019 年 4 月 15 日
I need to represent the performance of multple programs by time elapsed vs size.But I don't know how to convert time I got. Also is my way correct to represent my Data ?
I will appricated any help.
X=[ '0m45.364s','0m45.097s','0m46.984s','0m44.962s','1m29.656s']; % this is time elapsed
Y = [200,400,600,800,1000,1200,1400,1600,1800,2000]; % the size
figure
hold on % allow all vectors to be plotted in same
% figure
plot(t, X, 'blue', t, Y, 'red', t, Z, 'green')
title('Row versus column ') % title
ylabel('Matrics size') % label for y axis
xlabel('Millisecond') % label for x axis
legend('Trial 1', 'Trial 2')
legend('Location','NorthWest') % move legend to upper left
  6 件のコメント
Walter Roberson
Walter Roberson 2019 年 4 月 8 日
I do not have access to matlab at the moment.
Did you change to {} in X? The [] you have would create one long character vector instead of a collection of items.
Brave A
Brave A 2019 年 4 月 8 日
Yes fixed but the problem still there. I'm new user for matlab if anyone can fix all my code I will appricated.

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2019 年 4 月 8 日
X={ '0m45.364s','0m45.097s','0m46.984s','0m44.962s','1m29.656s'};
dt = datetime(X, 'InputFormat', 'm''m''s.SSS''s''');
Xms = milliseconds(dt - dateshift(dt, 'start', 'day'));
I used milliseconds rather than seconds because your x label says milliseconds. On the other hand, your x label is for your t variable (that we do not have values for), and your y label is for matrix size, which is in the 200 to 2000 range. It is not clear to me why you would plot elapsed time on the same axes as matrix size. It would make more sense to me if your were using the milliseconds from X as your X axis.
  15 件のコメント
Brave A
Brave A 2019 年 4 月 14 日
So I have separete dataset and I need to import them and plot all of them in same plot.
Brave A
Brave A 2019 年 4 月 15 日

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTitle についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by