function colormap_out=Extract_Colormap(inputfig, colormapsize)% Creat a colormap array from the input figure.% The figure is a colormap which you like very% you can use the colormap_out in such a way: colormap(out)% % when you plot your own figures...xist(inputfig,'file')if~exist(inputfig,'file')warning('You should provide a valid colormap figure!');return;end
colormap_out =zeros(colormapsize,3);
A=imread(inputfig);[I,J,K]=size(A);
Elong =max(I,J);
Eshort =int8(min(I,J)/2);i=linspace(3,Elong -2,colormapsize);i=int16(i);if I>J
colormap_out=A(i,Eshort,:);else
colormap_out=A(Eshort,i,:);end
colormap_out =squeeze(flipud(colormap_out));
colormap_out =double(colormap_out)/255;end
CAN(Controller Area Network)总线是一种广泛应用于汽车和工业领域的通信协议,用于实时数据传输和设备之间的通信。而虹科的PCAN-Explorer 6软件是一款功能强大的CAN总线分析工具,为开发人员提供了丰富的功能和灵活性。本文将重点…
当涉及到互联网性能和可用性优化时,DNS(Domain Name System)和CDN(Content Delivery Network)是两个至关重要的元素。它们各自发挥着关键作用,以确保用户能够快速、可靠地访问网站和应用程序。在本文中&…