%例36-7 离散数据点插值绘图 x=sort(rand(1,10)); y=sort(rand(1,10)); X=linspace(0,1,100); Y=spline(x,y,X); plot(x,y,'b*',X,Y,'g')
离散解 源代码
汇集 离散解 相关的电路原理图、PCB工程文件、单片机/FPGA源代码、数据手册与应用设计方案。
%例36-5 离散数据点直接绘图 x=sort(rand(1,10)); y=sort(rand(1,10)); plot(x,y)
%例36-7 离散数据点插值绘图 x=sort(rand(1,10)); y=sort(rand(1,10)); X=linspace(0,1,100); Y=spline(x,y,X); plot(x,y,'b*',X,Y,'g')
%例36-5 离散数据点直接绘图 x=sort(rand(1,10)); y=sort(rand(1,10)); plot(x,y)
like 1019 line painting 预处理: 由于数据大要用离散化.本题是离散化的经典教材. 算法: (1) 枚举每个离散化后的行(或列),把相应行(或列)可以看成是区间的覆盖颜色. 注意覆盖顺序,应该上面的先处理,否则一个线段会重复被…
%dm07205 %观察离散正弦序列的周期性 n=0:40; subplot(2,1,1) stem(n,cos(n*pi/6),'filled') title('cos(n*pi/6)') subplot(2,1,2) stem(n,cos(4…
%dm07205 %观察离散正弦序列的周期性 n=0:40; subplot(2,1,1) stem(n,cos(n*pi/6),'filled') title('cos(n*pi/6)') subplot(2,1,2) stem(n,cos(4…
%例36-7 离散数据点插值绘图 x=sort(rand(1,10)); y=sort(rand(1,10)); X=linspace(0,1,100); Y=spline(x,y,X); plot(x,y,'b*',X,Y,'g')
%例36-5 离散数据点直接绘图 x=sort(rand(1,10)); y=sort(rand(1,10)); plot(x,y)
%discrete signal n=-2:6; x=[0 0 1 2 1 0 -1 0 0]; stem(n,x,'filled');%用来画离散的信号 axis([-3,7,-2,3]); xlabel('n'); ylabel('x[n]')…