Plot different length vectors on the same x-axis

조회 수: 6 (최근 30일)
Mattia Boldrini
Mattia Boldrini 2020년 5월 29일
댓글: Mattia Boldrini 2020년 5월 29일
Hi, I've got the following situation on my hands:
I have three matrixes that contain the number of epochs plus a few metrics for the training of a machine learning algorithm, for a total of 5 columns each.
The first table has 193 rows, the second and third ones have 173.
I would like to plot the second column of each matrix on the same plot, using the first column of the biggest matrix as x axis. My idea would be to obtain a plot in which the first line arrives to the limit of the x axis and the other two stop earlier.
Thank you for your attention.

채택된 답변

Alberto Mora
Alberto Mora 2020년 5월 29일
So you have to do something like
plot(matix1(:,1),matix1(:,2)); hold on;
plot(matix1(1:173,1),matix2(:,2));
plot(matix1(1:173,1),matix3(:,2));
  댓글 수: 1
Mattia Boldrini
Mattia Boldrini 2020년 5월 29일
well thank you, that was easier than I'd thought

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by