⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 snsr_show.m

📁 biomedical stuffs...
💻 M
字号:
%Preload  snsr_ncl.txt%snsr_show.m  This program displays the movement of the simulated leg in a plot % with one cycle at the slow frequency shown on the left (constant offset observed)% and the faster frequency shown on the right where the error is increased%  This error is plotted at the end of the movement.%
%	This program is distributed as a supplement to the book
%	"Biomedical Signal Processing and Signal Modeling" by E. N. Bruce,
%	published by Wiley, 2000.  It is provided for educational use only.
%  While every effort has been made to insure its suitability to illustrate
%  principles described in the above book, no specific feature or capability 
%  is implied or guaranteed.
 cnt1=[1901:2100]; cnt2=[1221:1420]; n1=1;n2=1; for n=1:200%2714figure(1)   subplot(121)   n1=cnt1(n); n2=cnt2(n);          %plot([0 5*cos(snsr_ncl(n1,2)*pi/180)],[0 -5*sin(snsr_ncl(n1,2)*pi/180)],'r*-',[0 5*cos(snsr_ncl(n1,3)*pi/180)],[0 -5*sin(snsr_ncl(n1,3)*pi/180)],'bp-',[0 5*cos(snsr_ncl(n1,4)*pi/180)],[0 -5*sin(snsr_ncl(n1,4)*pi/180)],'gd-')            plot([0 5*sin(snsr_ncl(n1,2)*pi/180)],[0 -5*cos(snsr_ncl(n1,2)*pi/180)],'r*-',[0 5*sin(snsr_ncl(n1,3)*pi/180)],[0 -5*cos(snsr_ncl(n1,3)*pi/180)],'bp-',[-2 7], [0 0], 'k', [0 0],[-5.5 2],'k')         axis([-2 5.5  -6 2])         axis off                      text(-1,-6, 'Extension=0 degrees')          subplot(122)           plot([0 5*sin(snsr_ncl(n2,2)*pi/180)],[0 -5*cos(snsr_ncl(n2,2)*pi/180)],'r*-',[0 5*sin(snsr_ncl(n2,3)*pi/180)],[0 -5*cos(snsr_ncl(n2,3)*pi/180)],'bp-',[-2 7], [0 0], 'k', [0 0],[-5.5 2],'k')                  axis([0 7  -6 2])         axis off      text(5.05, .2, 'Extension = 90')               text(-1,-6, 'Extension=0 degrees')      legend('EM Sensor','Tilt Sensor')      pause(.05)               end   figure(2)      subplot(121)      plot(snsr_ncl([1:200],1),snsr_ncl([1901:2100],2)-snsr_ncl([1901:2100],3))   title('Error--Low Frequency')   xlabel('Time (sec)')   ylabel('EM Sensor-Tilt Sensor')  axis([0 10 -25 15])          subplot(122)      plot(snsr_ncl([1:200],1),snsr_ncl([1221:1420],2)-snsr_ncl([1221:1420],3))       title('Error--High Frequency')       xlabel('Time (sec)')       axis([0 10 -25 15])    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -