ÐźÅÓëϵͳMATLABʵÑé

2016-2017ѧÄêµÚһѧÆÚ

ÐźÅÓëϵͳʵÑ鱨¸æ

°à¼¶£º ÐÕÃû£º ѧºÅ£º³É¼¨£º

Ö¸µ¼½Ìʦ£º

ʵÑéÒ» ³£¼ûÐźŵÄMATLAB±íʾ¼°ÔËËã

Ò»£®ÊµÑéÄ¿µÄ

1£®ÊìϤ³£¼ûÐźŵÄÒâÒå¡¢ÌØÐÔ¼°²¨ÐÎ

2£®Ñ§»áʹÓÃMATLAB±íʾÐźŵķ½·¨²¢»æÖÆÐźŲ¨ÐÎ 3. ÕÆÎÕʹÓÃMATLAB½øÐÐÐźŻù±¾ÔËËãµÄÖ¸Áî 4. ÊìϤÓÃMATLABʵÏÖ¾í»ý»ý·ÖµÄ·½·¨

¶þ£®ÊµÑéÔ­Àí

ÐźÅÒ»°ãÊÇËæʱ¼ä¶ø±ä»¯µÄijЩÎïÀíÁ¿¡£°´ÕÕ×Ô±äÁ¿µÄÈ¡ÖµÊÇ·ñÁ¬Ðø£¬ÐźŷÖΪÁ¬Ðøʱ¼äÐźźÍÀëɢʱ¼äÐźţ¬Ò»°ãÓÃf(t)ºÍf(k)À´±íʾ¡£Èô¶ÔÐźŽøÐÐʱÓò·ÖÎö£¬¾ÍÐèÒª»æÖÆÆ䲨ÐΣ¬Èç¹ûÐźűȽϸ´ÔÓ£¬ÔòÊÖ¹¤»æÖƲ¨ÐξͱäµÃºÜÀ§ÄÑ£¬ÇÒÄÑÒÔ¾«È·¡£MATLABÇ¿´óµÄͼÐδ¦Àí¹¦Äܼ°·ûºÅÔËË㹦ÄÜ£¬ÎªÊµÏÖÐźŵĿÉÊÓ»¯¼°ÆäʱÓò·ÖÎöÌṩÁËÇ¿ÓÐÁ¦µÄ¹¤¾ß¡£

¸ù¾ÝMATLABµÄÊýÖµ¼ÆË㹦ÄܺͷûºÅÔËË㹦ÄÜ£¬ÔÚMATLABÖУ¬ÐźÅÓÐÁ½ÖÖ±íʾ·½·¨£¬Ò»ÖÖÊÇÓÃÏòÁ¿À´±íʾ£¬ÁíÒ»ÖÖÔòÊÇÓ÷ûºÅÔËËãµÄ·½·¨¡£ÔÚ²ÉÓÃÊʵ±µÄMATLABÓï¾ä±íʾ³öÐźź󣬾ͿÉÒÔÀûÓÃMATLABÖеĻæͼÃüÁî»æÖƳöÖ±¹ÛµÄÐźŲ¨ÐÎÁË¡£ÏÂÃæ·Ö±ð½éÉÜÁ¬Ðøʱ¼äÐźźÍÀëɢʱ¼äÐźŵÄMATLAB±íʾ¼°Æ䲨ÐλæÖÆ·½·¨¡£

1.Á¬Ðøʱ¼äÐźÅ

ËùνÁ¬Ðøʱ¼äÐźţ¬ÊÇÖ¸Æä×Ô±äÁ¿µÄÈ¡ÖµÊÇÁ¬ÐøµÄ£¬²¢ÇÒ³ýÁËÈô¸É²»Á¬ÐøµÄµãÍ⣬¶ÔÓÚÒ»ÇÐ×Ô±äÁ¿µÄÈ¡Öµ£¬ÐźŶ¼ÓÐÈ·¶¨µÄÖµÓëÖ®¶ÔÓ¦¡£´ÓÑϸñÒâÒåÉϽ²£¬MATLAB²¢²»ÄÜ´¦ÀíÁ¬ÐøÐźš£ÔÚMATLABÖУ¬ÊÇÓÃÁ¬ÐøÐźÅÔÚµÈʱ¼ä¼ä¸ôµãÉϵÄÑùÖµÀ´½üËƱíʾµÄ£¬µ±È¡Ñùʱ¼ä¼ä¸ô×㹻Сʱ£¬ÕâЩÀëÉ¢µÄÑùÖµ¾ÍÄܽϺõؽüËƳöÁ¬ÐøÐźš£ÔÚMATLABÖÐÁ¬ÐøÐźſÉÓÃÏòÁ¿»ò·ûºÅÔËË㹦ÄÜÀ´±íʾ¡£

¢Å ÏòÁ¿±íʾ·¨ ¶ÔÓÚÁ¬Ðøʱ¼äÐźÅf(t)£¬¿ÉÒÔÓÃÁ½¸öÐÐÏòÁ¿fºÍtÀ´±íʾ£¬ÆäÖÐÏòÁ¿tÊÇÓÃÐÎÈçt?t1:p:t2µÄÃüÁÒåµÄʱ¼ä·¶Î§ÏòÁ¿£¬ÆäÖУ¬t1ΪÐźÅÆðʼʱ¼ä£¬t2ΪÖÕֹʱ¼ä£¬pΪʱ¼ä¼ä¸ô¡£ÏòÁ¿fΪÁ¬ÐøÐźÅf(t)ÔÚÏòÁ¿tËù¶¨ÒåµÄʱ¼äµãÉϵÄÑùÖµ¡£

˵Ã÷£º plotÊdz£ÓõĻæÖÆÁ¬ÐøÐźŲ¨Ðεĺ¯Êý¡£

Ñϸñ˵À´£¬MATLAB²»ÄܱíʾÁ¬ÐøÐźţ¬ËùÒÔ£¬ÔÚÓÃplot( )ÃüÁî»æÖƲ¨ÐÎʱ£¬Òª¶Ô×Ô±äÁ¿t½øÐÐÈ¡Öµ£¬MATLAB»á·Ö±ð¼ÆËã¶ÔÓ¦µãÉϵĺ¯ÊýÖµ£¬È»ºó½«¸÷¸öÊý¾Ýµãͨ¹ýÕÛÏßÁ¬½ÓÆðÀ´»æÖÆͼÐΣ¬´Ó¶øÐγÉÁ¬ÐøµÄÇúÏß¡£Òò´Ë£¬»æÖƵÄÖ»ÊǽüËƲ¨ÐΣ¬¶øÇÒ£¬Æ侫¶ÈÈ¡¾öÓÚtµÄÈ¡Ñù¼ä¸ô¡£tµÄÈ¡Ñù¼ä¸ôԽС£¬¼´µãÓëµãÖ®¼äµÄ¾àÀëԽС£¬Ôò½üËƳ̶ÈÔ½ºÃ£¬ÇúÏßÔ½¹â»¬¡£ÀýÈ磺ͼ1-1ÊÇÔÚÈ¡Ñù¼ä¸ôΪp=0.5ʱ»æÖƵIJ¨ÐΣ¬¶øͼ1-2ÊÇÔÚÈ¡Ñù¼ä¸ôp=0.1ʱ»æÖƵIJ¨ÐΣ¬Á½Ïà¶ÔÕÕ£¬¿ÉÒÔ¿´³öͼ1-2Òª±Èͼ1-1¹â»¬µÃ¶à¡£

ÔÚÉÏÃæµÄf=sin(t). /tÓï¾äÖУ¬±ØÐëÓõã³ý·ûºÅ£¬ÒÔ±íʾÊÇÁ½¸öº¯Êý¶ÔÓ¦µãÉϵÄÖµÏà³ý¡£

¢Æ ·ûºÅÔËËã±íʾ·¨ Èç¹ûÒ»¸öÐźŻòº¯Êý¿ÉÒÔÓ÷ûºÅ±í´ïʽÀ´±íʾ£¬ÄÇôÎÒÃǾͿÉÒÔÓÃÇ°Ãæ½éÉܵķûºÅº¯ÊýרÓûæͼÃüÁîezplot()µÈº¯ÊýÀ´»æ³öÐźŵIJ¨ÐΡ£

¢Ç ³£¼ûÐźŵÄMATLAB±íʾ ¶ÔÓÚÆÕͨµÄÐźţ¬Ó¦ÓÃÒÔÉϽéÉܵÄÁ½ÖÖ·½·¨¼´¿ÉÍê³É¼ÆË㺯ÊýÖµ»ò»æÖƲ¨ÐΣ¬µ«ÊǶÔÓÚһЩ±È½ÏÌØÊâµÄÐźţ¬±ÈÈ絥λ½×Ô¾ÐźÅ(t)¡¢·ûºÅº¯Êýsgn(t)µÈ£¬ÔÚMATLABÖÐÕâЩÐźŶ¼ÓÐרÃŵıíʾ·½·¨¡£ µ¥Î»½×Ô¾ÐźÅ

?1µ¥Î»½×Ô¾ÐźŵĶ¨ÒåΪ£º?(t)???0t?0t?0?£¬µ¥Î»½×Ô¾ÐźÅÊÇÐźŷÖÎöµÄ»ù

±¾ÐźÅÖ®Ò»£¬ÔÚÐźÅÓëϵͳ·ÖÎöÖÐÓÐ×ŷdz£ÖØÒªµÄ×÷Óã¬Í¨³££¬ÎÒÃÇÓÃËüÀ´±íʾÐźŵĶ¨ÒåÓò£¬¼ò»¯ÐźŵÄʱÓò±íʾÐÎʽ¡£ÀýÈ磺¿ÉÒÔÓÃÁ½¸ö²»Í¬ÑÓʱµÄµ¥Î»½×Ô¾ÐźÅÀ´±íʾһ¸ö¾ØÐÎÃÅÐźţ¬¼´£ºG2(t)??(t?1)??(t?1)

ÔÚMATLABÖУ¬¿Éͨ¹ý¶àÖÖ·½·¨µÃµ½µ¥Î»½×Ô¾Ðźţ¬ÏÂÃæ·Ö±ð½éÉÜ¡£ ·½·¨Ò»£º µ÷ÓÃHeaviside(t)º¯Êý

ÔÚMATLABµÄSymbolic Math Toolbox ÖУ¬ÓÐרÃÅÓÃÓÚ±íʾµ¥Î»½×Ô¾Ðźŵĺ¯Êý£¬¼´Heaviside(t)º¯Êý£¬ÓÃËü¼´¿É·½±ãµØ±íʾ³öµ¥Î»½×Ô¾ÐźÅÒÔ¼°ÑÓʱµÄµ¥Î»½×Ô¾Ðźţ¬²¢ÇÒ¿ÉÒÔ·½±ãµØ²Î¼ÓÓйصĸ÷ÖÖÔËËã¹ý³Ì¡£

Ê×Ïȶ¨Ò庯ÊýHeaviside(t) µÄmº¯ÊýÎļþ,¸ÃÎļþÃûÓ¦Ó뺯ÊýÃûͬÃû¼´Heaviside.m¡£%¶¨Ò庯ÊýÎļþ,º¯ÊýÃûΪHeaviside,ÊäÈë±äÁ¿Îªx,Êä³ö±äÁ¿Îªy function y= Heaviside(t)

y=(t>0); %¶¨Ò庯ÊýÌ壬¼´º¯ÊýËùÖ´ÐÐÖ¸Áî

%´Ë´¦¶¨Òåt>0ʱy=1,t<=0ʱy=0£¬×¢ÒâÓëʵ¼Ê½×Ô¾ÐźŶ¨ÒåµÄÇø±ð¡£

·½·¨¶þ£ºÊýÖµ¼ÆËã·¨ ÔÚMATLABÖУ¬ÓÐÒ»¸öרÃÅÓÃÓÚ±íʾµ¥Î»½×Ô¾Ðźŵĺ¯Êý£¬¼´stepfun( )º¯Êý£¬ËüÊÇÓÃÊýÖµ¼ÆËã·¨±íʾµÄµ¥Î»½×Ô¾º¯Êý?(t)¡£Æäµ÷ÓøñʽΪ£º

stepfun(t,t0) ????

ÆäÖУ¬tÊÇÒÔÏòÁ¿ÐÎʽ±íʾµÄ±äÁ¿£¬t0±íʾÐźŷ¢ÉúÍ»±äµÄʱ¿Ì£¬ÔÚt0ÒÔÇ°£¬º¯ÊýֵСÓÚÁ㣬t0ÒÔºóº¯ÊýÖµ´óÓÚÁã¡£ÓÐȤµÄÊÇËüͬʱ»¹¿ÉÒÔ±íʾµ¥Î»½×Ô¾ÐòÁÐ?(k)£¬ÕâÖ»Òª½«×Ô±äÁ¿ÒÔ¼°È¡Ñù¼ä¸ôÉ趨ΪÕûÊý¼´¿É¡£Óйص¥Î»½×Ô¾ÐòÁÐ

?(k)µÄ±íʾ·½·¨£¬ÎÒÃǺóÃæÓÐרÃÅÂÛÊö£¬ÏÂÃæͨ¹ýÒ»¸öÀý×ÓÀ´ËµÃ÷ÈçºÎµ÷ÓÃ

stepfun( )º¯ÊýÀ´±íʾµ¥Î»½×Ô¾º¯Êý¡£ ·ûºÅº¯Êý

?1·ûºÅº¯ÊýµÄ¶¨ÒåΪ£ºsgn(t)????1t?0t?0?????

ÔÚMATLABÖÐÓÐרÃÅÓÃÓÚ±íʾ·ûºÅº¯ÊýµÄº¯Êýsign() £¬ÓÉÓÚµ¥Î»½×Ô¾ÐźÅ? 1(t)ºÍ·ûºÅº¯ÊýÁ½ÕßÖ®¼ä´æÔÚÒÔϹØϵ£º?(t)?12?2sgn(t)£¬Òò´Ë£¬ÀûÓÃÕâ¸öº¯Êý

¾Í¿ÉÒÔºÜÈÝÒ×µØÉú³Éµ¥Î»½×Ô¾Ðźš£ÏÂÃæ¾Ù¸öÀý×ÓÀ´ËµÃ÷ÈçºÎÀûÓÃsign()º¯ÊýÉú³Éµ¥Î»½×Ô¾Ðźţ¬²¢Í¬Ê±»æÖÆÆ䲨ÐΡ£ 2.Àëɢʱ¼äÐźÅ

Àëɢʱ¼äÐźÅÓÖ½ÐÀëɢʱ¼äÐòÁУ¬Ò»°ãÓÃf(k) ±íʾ£¬ÆäÖбäÁ¿kΪÕûÊý£¬´ú±íÀëÉ¢µÄ²ÉÑùʱ¼äµã£¨²ÉÑù´ÎÊý£©¡£

Èý£®ÊµÑéÄÚÈÝ

1.·Ö±ðÓÃMATLABµÄÏòÁ¿±íʾ·¨ºÍ·ûºÅÔËË㹦ÄÜ£¬±íʾ²¢»æ³öÏÂÁÐÁ¬Ðøʱ¼äÐźŵIJ¨ÐΣº

?t£¨2£©f(t)?cos()??(t)??(t?4)?

2syms t;

f=sym('cos(t)*pi*t/2*[heaviside(t)-heaviside(t-4)]'); ezplot(f,[-2,8]); (4)f(t)?23t?(t?2)???????

syms t;

f=sym('2/3*t*heaviside(t+2)'); ezplot(f,[-4,8]);

2.·Ö±ðÓÃMATLAB±íʾ²¢»æ³öÏÂÁÐÀëɢʱ¼äÐźŵIJ¨ÐΣº £¨2£©f(t)?k??(k)??(k?8)? t=0:8; t1=-10:15;

f=[zeros(1,10),t,zeros(1,7)]; stem(t1,f)

axis([-10,15,0,10]) (4) f(k)??(?k?2)????????

t=-20:10;?

f=[ones(1,23),zeros(1,8)]; stem(t,f) stem(t,f)

3.ÒÑÖªÐźÅf(t)µÄ²¨ÐÎÈçÏÂͼËùʾ£¬ÊÔÓÃMATLAB»æ³öÂú×ãÏÂÁÐÒªÇóµÄÐźŲ¨ÐΡ£?? £¨2£©f(t?2) t=-1:0.01:4; t0=0; t1=1;

ÁªÏµ¿Í·þ£º779662525#qq.com(#Ì滻Ϊ@)