Location:
Search - matlab bsxfun
Search list
Description: bsxfun, 一個matlab中十分常用的函數. 可以快速地對matrix進行接位複合運算-bsxfun, a very commonly used in the matlab function. can quickly take place on the matrix for composite operator ~ ~
Platform: |
Size: 7168 |
Author: Wilman |
Hits:
Description: Matlab画的线较多时,线的颜色的选取对图的美观是有很大的影响的。
Jonathan C. Lansey
提供了在不同线上画不同颜色简单易用的函数。-Examples demonstrating the colors.
LINE COLORS
N 6
X linspace(0,pi*3,1000)
Y bsxfun(@(x,n)sin(x+2*n*pi/N), X. , 1:N)
C linspecer(N)
axes( NextPlot , replacechildren , ColorOrder ,C)
plot(X,Y, linewidth ,5)
ylim([-1.1 1.1])
SIMPLER LINE COLOR EXAMPLE
N 6 X linspace(0,pi*3,1000)
C linspecer(N)
hold off
for ii 1:N
Y sin(X+2*ii*pi/N)
plot(X,Y, color ,C(ii,:), linewidth ,3)
hold on
end
COLORMAP EXAMPLE
A rand(15)
figure imagesc(A) default colormap
figure imagesc(A) colormap(linspecer) linspecer colormap
注:C即为生成的RGB颜色(非常好用)
Platform: |
Size: 4096 |
Author: g |
Hits: