发布网友 发布时间:2024-10-17 05:09
共1个回答
热心网友 时间:2024-10-21 10:49
用scatter函数画点并标出每个点的序号,可以text()来实现。如
A=[384 310;386 306;389 300;392 294;396 287;400 281;404 277;409 272;413 269;417 267;420 265;424 263;430 260;434 257;439 256];
x=A(:,1);
y=A(:,2);
n=length(x);
c = linspace(1,10,length(x));
scatter(x,y,[],c)
text(x,y,arrayfun(@(x)[' ' num2str(x)],1:n,'UniformOutput',0))