MATLAB:在x轴上绘制了什么?

问题描述 投票:0回答:1

奇怪的问题,但是我对此并不陌生。因此,我们被要求计算一帧包含视频球的所有出现次数,并将其绘制(knn最近邻)。因此,我逐帧查看了物料,并在Excel图表中记录了所有不同k值的出现。现在,我将此数据集导入Matlab并进行了绘制(尽我所能)。但是,我不知道在x轴上绘制了什么?这是球发生的时间,y是球发生的帧吗? This is the graph that is plotted

clc;
clear all;

k1 = xlsread('k1-5table.xlsx', 1, 'A2')
k2 = xlsread('k1-5table.xlsx', 1,'B2:B119')
k3 = xlsread('k1-5table.xlsx', 1, 'C2:C102')
k4 = xlsread('k1-5table.xlsx', 1, 'D2:D76')
k5 = xlsread('k1-5table.xlsx', 1, 'E2:E62')

plot(k1, 'r', 'LineWidth', 3)
hold on;
plot(k2, 'b')
hold on;
plot(k3, 'g')
hold on;
plot(k4, 'k')
hold on;
plot(k5, 'y')
xlabel('time per frame'), ylabel('frames')
title('k1-5 Difference')
legend('k1 = red', 'k2 = blue', 'k3 = green', 'k4 = black', 'k5 = yellow')

And this is part of my Excel table, so for each K-kNN-Value one column

感谢您的帮助,对不起我在这里的知识。

matlab plot knn
1个回答
0
投票

[当使用plot(y)进行绘图时,您会在x轴上获得向量y的索引:1,2,...,长度(y)。

© www.soinside.com 2019 - 2024. All rights reserved.