Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在图例上显示导入的日期,我正在导入许多不同的值,这些值对应于不同的日期。然而,图例只显示“Data1”、“Data2”等。我不确定如何让日期与导入的值匹配。
[num,text] = xlsread(gT); t = [100:50:200]'; d = num(t,:)/256;d = d'; D = linspace(0, 13.5, 39); D = D'; plot(d,D) set(gca,'Ydir','reverse'); legend('show')
我想我设法弄清楚了,非常容易。
[num,text] = xlsread(gT); t = [100:80:400]'; d = num(t,:)/256;d = d'; D = linspace(0, 13.5, 39); D = D'; figure(2); plot(d,D) set(gca,'Ydir','reverse'); legend(strcat(text(t)))