數(shù)字信號(hào)處理實(shí)驗(yàn)一 實(shí)驗(yàn)報(bào)告_第1頁
數(shù)字信號(hào)處理實(shí)驗(yàn)一 實(shí)驗(yàn)報(bào)告_第2頁
數(shù)字信號(hào)處理實(shí)驗(yàn)一 實(shí)驗(yàn)報(bào)告_第3頁
數(shù)字信號(hào)處理實(shí)驗(yàn)一 實(shí)驗(yàn)報(bào)告_第4頁
數(shù)字信號(hào)處理實(shí)驗(yàn)一 實(shí)驗(yàn)報(bào)告_第5頁
已閱讀5頁,還剩38頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、數(shù)字信號(hào)處理實(shí)驗(yàn)一1. 完成本文檔內(nèi)容的自學(xué)閱讀和其中各例題后子問題;Q1.1運(yùn)行程序P1.1,以產(chǎn)生單位樣本序列un并顯示它。答: clf;n=-10:20;u=zeros(1,10) 1 zeros(1,20);stem(n,u);xlabel('時(shí)間序號(hào)n');ylabel('振幅');title('單位樣本序列'); axis(-10 20 0 1.2)Q1.2命令clf,axis,title,xlabel和ylabel的作用是什么?答:clf清除圖對(duì)象,axis 控制軸刻度和風(fēng)格的高層指令,title 設(shè)置圖名,xlabel和ylabe

2、l設(shè)置橫縱坐標(biāo)軸名稱。Q1.3修改程序P1.1以產(chǎn)生帶有延時(shí)11個(gè)單位樣本的延遲單位樣本序列udn。運(yùn)行修改的程序并顯示產(chǎn)生的序列。答:clf;n=0:30;ud=zeros(1,11) 1 zeros(1,19);stem(n,ud);xlabel('時(shí)間序號(hào)n');ylabel('振幅');title('單位樣本序列'); axis(0 30 0 1.2)Q1.4修改程序P1.1以產(chǎn)生單位步長序列sn.運(yùn)行修改后程序并顯示產(chǎn)生的序列。答:clf; n = 0:30; u = 1.*n; stem(n,u); title('Unit S

3、ample Sequence'); axis(0 30 0 30)Q1.5修改程序P1.1,以產(chǎn)生帶有超前7個(gè)樣本的延時(shí)單位階躍序列sdn。運(yùn)行修改后的程序并顯示產(chǎn)生的序列。答:clf; n = -15:30; s=zeros(1,8) ones(1,38); stem(n,s); xlabel('Time index n');ylabel('Amplitude'); title('Unit Sample Sequence'); axis(-15 30 0 1.2);Q1.6 運(yùn)行程序P1.2,以產(chǎn)生復(fù)數(shù)值的指數(shù)序列。答:clf; c =

4、 -(1/12)+(pi/6)*i; K = 2; n = 0:40; x = K*exp(c*n); subplot(2,1,1); stem(n,real(x); xlabel('時(shí)間序號(hào) n');ylabel('振幅'); title('實(shí)部'); subplot(2,1,2); stem(n,imag(x); xlabel('時(shí)間序號(hào) n');ylabel('振幅'); title('虛部');Q1.7 哪個(gè)參數(shù)控制該序列的增長或衰減率?那個(gè)參數(shù)控制該序列的振幅?答:參數(shù)c控制該序列的增長或

5、衰減率;參數(shù)K控制該序列的振幅。Q1.8 若參數(shù)c改為(1/12)+(pi/6)*i,將會(huì)發(fā)生什么情況?Q1.9 運(yùn)算符real和imag的作用是什么?答:運(yùn)算符real和imag的作用分別是提取運(yùn)算數(shù)值x的“實(shí)部”和“虛部”,以便于接下來分別將“實(shí)部”和“虛部”成像。Q1.10命令subplot的作用是什么?答:命令subplot的作用是使“實(shí)部”和“虛部”用兩張圖像呈現(xiàn)出來,subplot(a,b,c),其中a代表圖像分兩行呈現(xiàn),b代表圖像分一列呈現(xiàn),a代表第a行的第b列圖像。Q1.11 運(yùn)行程序P1.3,以產(chǎn)生實(shí)數(shù)值的指數(shù)序列。答:clf; n = 0:35; a = 1.2; K =

6、0.2; x = K*a.n; stem(n,x); xlabel('時(shí)間序號(hào) n');ylabel('振幅');Q1.12 哪個(gè)參數(shù)控制該序列的增長或者衰減率?哪個(gè)參數(shù)控制該序列的振幅? 答:參數(shù)a控制該序列的增長或者衰減率;參數(shù)K控制該序列的振幅。Q1.13 算數(shù)運(yùn)算符和.之間的區(qū)別是什么?答:運(yùn)算符“”表示a的指數(shù)是n這個(gè)序列;運(yùn)算符“.”表示a的指數(shù)分別是n這個(gè)序列中的每一個(gè)數(shù)字,即對(duì)應(yīng)的每一個(gè)元素。Q1.14 若參數(shù)a小于1,會(huì)發(fā)生什么情況?將參數(shù)a改為0.9,將參數(shù)K改為20,再次運(yùn)行程序P1.3.答:(1)若參數(shù)a小于1,指數(shù)序列在“n=0:35”

7、上是衰減的序列; (2)將k改為20后的圖像如圖所示:Q1.15 該序列的長度是多少?怎么樣才能改變它?答:該序列的長度是35;通過改變“n=0:35”中的“35”這個(gè)數(shù)字可以改變序列的長度。Q1.16 使用MATLAB命令sum(s.*s)可計(jì)算用向量s表示的實(shí)數(shù)序列sn的能量。試求在習(xí)題Q1.11和習(xí)題Q1.14中產(chǎn)生的實(shí)數(shù)值指數(shù)序列xn的能量。答:Q1.11中:ans=4.5673e+004; Q1.14中:ans=2.1042e+003Q1.17 運(yùn)行程序P1.4以產(chǎn)生正弦序列并顯示它。 答:n = 0:40;f = 0.1;phase = 0;A = 1.5;arg = 2*pi*f

8、*n - phase; x = A*cos(arg);clf;stem(n,x);axis(0 40 -2 2);grid; title('正弦序列');xlabel('時(shí)間序號(hào) n');ylabel('振幅');axis; Q1.18 該序列的頻率是多少?怎樣可以改變它?哪個(gè)參數(shù)控制該序列的相位?哪個(gè)參數(shù)控制該序列的振幅?該序列的周期是多少?答:該序列的頻率是0.1Hz;通過改變f的值可以此正弦序列的頻率;參數(shù)phase控制該序列的初相位;參數(shù)A控制該序列的振幅;該序列的周期是10s。Q1.19 該序列的長度是多少?怎么樣可以改變它?答:該序列

9、的長度是41個(gè)時(shí)間單位,通過改變n的參數(shù)可以改變?cè)撔蛄械拈L度。Q1.21 axis和grid命令的作用是什么?答:axis的作用是規(guī)定圖像顯示的橫縱坐標(biāo)的范圍;grid的作用是顯示圖像上面的“網(wǎng)格”。Q1.22 修改程序P1.4,以產(chǎn)生一個(gè),頻率為0.9的正弦序列并顯示它。把此序列和習(xí)題Q1.17所產(chǎn)生的序列相比較。修改程序P1.4以產(chǎn)生一個(gè)頻率為1.1的正弦序列并顯示它。把此序列與Q1.17中產(chǎn)生的序列相比較,評(píng)價(jià)你的結(jié)果。答:修改正弦序列的頻率只需要改變程序中“f”的值即可,第一個(gè)改為f=0.9,結(jié)果如下圖:第二個(gè)改為f=1.1,結(jié)果圖像如下:結(jié)論:該圖像與f=0.1時(shí)的圖像一樣,因?yàn)樵撜?/p>

10、弦序列的最小周期是2pi的,而當(dāng)f=0.9與f=1.1時(shí)正好是2pi的整數(shù)倍。Q1.23 修改上述程序,以產(chǎn)生長度為50、頻率為0.08、振幅為2.5、相移為90度的一個(gè)正弦序列并顯示它。該序列的周期是多少?程序:n = 0:49;f = 0.08;phase =1.57;A = 2.5;arg = 2*pi*f*n - phase; x = A*cos(arg);clf;stem(n,x);axis(0 49 -2.5 2.5);grid; title('正弦序列');xlabel('時(shí)間序號(hào) n');ylabel('振幅');axis; 本序

11、列周期為12.5s。Q1.24 在程序P1.4中用plot命令代替stem命令,運(yùn)行新程序。新圖形與習(xí)題Q1.17中產(chǎn)生的圖形有什么區(qū)別?答:答:原圖像是離散的,新圖像是連續(xù)的,說明plot命令是用平滑的線將各點(diǎn)連接起來產(chǎn)生連續(xù)波,而stem命令則是用各點(diǎn)來產(chǎn)生離散波。Q1.25 在程序P1.4中用stairs命令代替stem命令,運(yùn)行新程序。新圖形與習(xí)題Q1.17和習(xí)題Q1.24中產(chǎn)生的圖形有什么區(qū)別?答:Stairs函數(shù)是用直線將相應(yīng)的點(diǎn)連接起來,類似于階梯狀。Q1.26 編寫一個(gè)MATLAB程序,以產(chǎn)生并顯示一個(gè)長度為100的隨機(jī)信號(hào),該信號(hào)在區(qū)間-2,2中均勻分布。 答:clf;x=(

12、rand(1,100)*4-2;plot(x);Q1.27 編寫一個(gè)MATLAB程序,以產(chǎn)生并顯示一個(gè)長度為75的高斯隨機(jī)信號(hào),該信號(hào)正態(tài)分布且均值為0,方差為3.答:clf; x=0+3*randn(1,75); stem(x);Q1.28 編寫一個(gè)MATLAB程序,以產(chǎn)生并顯示五個(gè)長度為31的隨機(jī)信號(hào)。Xn=A其中振幅A和相位是統(tǒng)計(jì)獨(dú)立的隨機(jī)變量,振幅在區(qū)間0相位區(qū)間在0內(nèi)均勻分布。答:clear,clcn=0:31; B=0; A=0; f=100A=4.*rand(1,length(n); B=2.*pi*rand(1,length(n); x=A.*cos(2*pi*f.*n+B);

13、 subplot(5,1,1)plot(n,x)axis(0 31 -4 4);grid;title('隨機(jī)正弦信號(hào)一');xlabel('n');ylabel('幅值A(chǔ)');A=4.*rand(1,length(n); B=2.*pi*rand(1,length(n); x=A.*cos(2*pi*f.*n+B); subplot(5,1,2)plot(n,x)axis(0 31 -4 4);grid;title('隨機(jī)正弦信號(hào)二');xlabel('n');ylabel('幅值A(chǔ)');A=4.*

14、rand(1,length(n); B=2.*pi*rand(1,length(n); x=A.*cos(2*pi*f.*n+B); subplot(5,1,3)plot(n,x)axis(0 31 -4 4);grid;title('隨機(jī)正弦信號(hào)三');xlabel('n');ylabel('幅值A(chǔ)');A=4.*rand(1,length(n); B=2.*pi*rand(1,length(n); x=A.*cos(2*pi*f.*n+B); subplot(5,1,4)plot(n,x)axis(0 31 -4 4);grid;title(

15、'隨機(jī)正弦信號(hào)四');xlabel('n');ylabel('幅值A(chǔ)');A=4.*rand(1,length(n); B=2.*pi*rand(1,length(n); x=A.*cos(2*pi*f.*n+B); subplot(5,1,5)plot(n,x)axis(0 31 -4 4);grid;title('隨機(jī)正弦信號(hào)五');xlabel('n');ylabel('幅值A(chǔ)');Q1.29 運(yùn)行程序P 1.5, 以產(chǎn)生所有相關(guān)的信號(hào)。答:clf; R=51; d=0.8*(rand(R,1

16、)-0.5); m=0:R-1; s=2*m.*(0.9.m); x=s+d' subplot(2,1,1); plot(m,d','r-',m,s,'g-',m,x,'b-.'); xlabel('時(shí)間序號(hào)n'); ylabel('振幅'); legend('dn','sn','xn'); x1=0 0 x; x2=0 x 0; x3=x 0 0; y=(x1+x2+x3)/3; subplot(2,1,2); plot(m,y(2:R+1),

17、9;r-',m,s,'g-'); legend('yn','sn'); xlabel('時(shí)間序號(hào)n'); ylabel('振幅');Q 1.30 未污染的信號(hào)sn是什么樣的形式?加性噪聲dn 是什么樣的形式?答:未污染的信號(hào)的形式應(yīng)該為Sn=2*m。*(0.9.m);=表達(dá)式所表示的圖形,不過自變量的取值為0-50的整數(shù),因此圖形應(yīng)該為一系列離散的點(diǎn); 加性噪聲dn=0.8*(rand(R,1)-0.5)的形式應(yīng)該為在區(qū)間(-0.4,0.4)中均勻分布長度為51的隨機(jī)信號(hào),且為列向量51*1。Q 1.31使

18、用語句x=s+d 能產(chǎn)生被噪聲污染的信號(hào)嗎?若不能,為什么? 答:不能,因?yàn)閟和d均是矩陣,d與s要想相加必須匹配,而矩陣d本身與矩陣s不匹配,必須把d轉(zhuǎn)置變?yōu)閐'才能與s進(jìn)行相加。 Q 1.32 信號(hào)x1,x2 和x3與信號(hào)x 之間的關(guān)系是什么? 答:x1是x的延時(shí),x2和x相等,x3超前于x。 Q 1.33 legend 命令的作用是什么? 答:legend 命令使得對(duì)MATLAB所畫的圖形進(jìn)行注釋Q1.34:在載波信號(hào)xHn和調(diào)制信號(hào)xLn采用不同頻率、不同調(diào)制指數(shù)m的情況下,運(yùn)行程序P1.6,以產(chǎn)生振幅調(diào)制信號(hào)yn。 答:n=0:100;m=0.4;fH=0.1;fL

19、=0.01; xH=sin(2*pi*fH*n); xL=sin(2*pi*fL*n); y=(1+m*xL).*xH stem(n,y); grid;xlabel('時(shí)間序號(hào) n'); ylabel('振幅');Q1.35:算術(shù)運(yùn)算符*和.*之間的區(qū)別是什么?答: “*”是進(jìn)行兩個(gè)標(biāo)量的相乘,所得結(jié)果仍為一個(gè)標(biāo)量;“.*”是長度相同的行向量(或者列向量相乘),所得結(jié)果仍為長度不變的行向量(或者列向量)。 Q1.36:運(yùn)行程序P 1.7, 以產(chǎn)生掃頻正弦序列xn。答:n=0

20、:100;  a=pi/2/100;b=0; arg=a*n.*n+b*n; x=cos(arg); clf; stem(n,x); axis(0,100.-1.5,1.5); title('掃頻正弦信號(hào)'); xlabel('時(shí)間序號(hào)n'); ylabel('振幅'); grid;axis;Q1.37:該信號(hào)最小頻率和最大頻率是多少?答:最小頻率是4HZ,最大頻率是400HZ。Q1.38:如何修改以上程序才能產(chǎn)生一個(gè)最小頻率為0.1最大

21、頻率為0.3的掃頻正弦信號(hào)?答:n=0:100;a=0.1;b=0.3;arg=a*n.*n+b*n;x=cos(arg);clf;stem(n,x);axis(0,100,-1.5,1.5);title('掃頻正弦信號(hào)');xlabel('時(shí)間序號(hào) n');Q1.39:在命令窗口鍵入who。此時(shí)窗口會(huì)顯示什么信息?答:Q1.40:在命令窗口鍵入whos。此時(shí)窗口會(huì)顯示什么信息?Q1.41:編寫MATLAB程序,以產(chǎn)生圖1.1和圖1.2中所示的方波和鋸齒波序列,并將序列繪制出來。答:產(chǎn)生方波程序:T=6; n=-5:0.1:2*T; duty=50; x=2*s

22、quare(n,duty); stem(n,x,'*k'); grid on; 產(chǎn)生鋸齒波程序:t=-6*pi:0.0001:6*pi;y=sawtooth(t);plot(t,y);2. 給出如下函數(shù)的幫助英文說明和翻譯(不局限于如下函數(shù),多翻譯其他函數(shù)并翻譯正確者可有加分)Square stem stairs zeros ones sawtoothFliplr方式:首先在matlab 命令窗中輸入“doc stem”(這里以stem 為例, 其他函數(shù)類似) , 在跳出幫助窗口中“Description”內(nèi)容即為翻譯內(nèi)容。答:Description(Square)x 

23、;= square(t) generates a square wave with period 2 for the elements of time vector t. square(t) is similar to sin(t), but creates a square wave with peaks of ±1 instead of a sine wave.x = square(t,duty) generates a square wave with specified duty cycle, duty, which is a number be

24、tween 0 and 100. The duty cycle is the percent of the period in which the signal is positive. 翻譯:x=square(t)生成一個(gè)基于時(shí)間向量t的周期為2的方波。Square(t)類似于sin(t),但是產(chǎn)生一個(gè)峰值為±1的方波而不是正弦波。 X=square(t,duty)生成一個(gè)具有指定的工作周期的方波,工作,是從0到100的數(shù)字。工作周期是正向信號(hào)的周期的百分比。Description(stem)A two-dimensional stem plot displays data as

25、lines extending from a baseline along the x-axis. A circle (the default) or other marker whose y-position represents the data value terminates each stem.stem(Y) plots the data sequence Y as stems that extend from equally spaced and automatically generated values along the x-axis. When Y is a matrix,

26、 stem plots all elements in a row against the same x value.stem(X,Y) plots X versus the columns of Y. X and Y must be vectors or matrices of the same size. Additionally, X can be a row or a column vector and Y a matrix with length(X) rows.stem(.,'fill') specifies whether to color the circle

27、at the end of the stem.stem(.,LineSpec) specifies the line style, marker symbol, and color for the stem and top marker (the baseline is not affected). See LineSpec for more information.stem(.,'PropertyName',PropertyValue,.) specifies property name and property value pairs for the stemseries

28、objects the function creates.stem(axes_handle,.) plots into the axes object with the handle axes_handle instead of into the current axes object (gca).h = stem(.) returns a vector of stemseries object handles in h, one handle per column of data in Y.翻譯:一個(gè)二維離散數(shù)據(jù)的火柴桿圖展示了從一個(gè)基礎(chǔ)線沿著X軸作為線性延伸的數(shù)據(jù)。一個(gè)循環(huán)(默認(rèn))或者其他

29、標(biāo)記了Y的坐標(biāo)代表了每一莖的數(shù)值。在二維離散數(shù)據(jù)的火柴桿圖(Y)中數(shù)據(jù)順序Y作為莖來從相等的空間和沿著x軸的自動(dòng)遷移數(shù)據(jù)延伸。當(dāng)Y是矩陣時(shí),莖葉圖所有元素在與相同x數(shù)值的相反一行中。二維離散數(shù)據(jù)的火柴桿圖(X,Y)中X與Y列相對(duì)。X和Y必須是向量或者相同尺寸的矩陣。另外,X可以使一行或者一列向量,Y是一個(gè)長度等于X的列。二維離散數(shù)據(jù)的火柴桿圖(.,'fill')指定在二維離散數(shù)據(jù)的火柴桿圖循環(huán)終點(diǎn)是否改變顏色。二維離散數(shù)據(jù)的火柴桿圖(.,LineSpec)指定線性類型,標(biāo)記符號(hào),和二維離散數(shù)據(jù)的火柴桿圖的顏色和頂端標(biāo)記(基線不受影響)。查看LineSpec獲得更多信息。二維離散

30、數(shù)據(jù)的火柴桿圖(.,'PropertyName',PropertyValue,.)指定特定的名字和特定的數(shù)值對(duì)作為stemseries項(xiàng)目的功能產(chǎn)生。二維離散數(shù)據(jù)的火柴桿圖(axes_handle,.)運(yùn)用axes_handle繪制進(jìn)入坐標(biāo)軸的目標(biāo)取代進(jìn)入的最近的坐標(biāo)軸目標(biāo)。h=stem(.)返回一個(gè)stemseries目標(biāo)用h運(yùn)行的矢量,一個(gè)運(yùn)行處理Y上的每一列數(shù)據(jù)。Description(stairs)Stairstep graphs are useful for drawing time-history graphs of digitally sampled data.s

31、tairs(Y) draws a stairstep graph of the elements of Y, drawing one line per column for matrices. The axes ColorOrder property determines the color of the lines.When Y is a vector, the x-axis scale ranges from 1 to length(Y). When Y is a matrix, the x-axis scale ranges from 1 to the number of rows in

32、 Y.stairs(X,Y) plots the elements in Y at the locations specified in X.X must be the same size as Y or, if Y is a matrix, X can be a row or a column vector such that length(X) = size(Y,1)stairs(.,LineSpec) specifies a line style, marker symbol, and color for the graph. (See LineSpec for more informa

33、tion.)stairs(.,'PropertyName',propertyvalue) creates the stairstep graph, applying the specified property settings. See Stairseries properties for a description of properties.stairs(axes_handle,.) plots into the axes with the handle axes_handle instead of into the current axes object (gca).h

34、 = stairs(.) returns the handles of the stairseries objects created (one per matrix column).xb,yb = stairs(Y,.) does not draw graphs, but returns vectors xb and yb such that plot(xb,yb) plots the stairstep graph.翻譯:階層曲線是對(duì)于繪制時(shí)程數(shù)字采樣數(shù)據(jù)曲線很有用的。階梯(Y)繪制一個(gè)Y所有元素的階層曲線,描繪了矩陣的一行和每一列。坐標(biāo)軸顏色順序性質(zhì)決定了曲線的顏色。當(dāng)Y是一個(gè)矢量,x軸

35、的刻度幅度從1到長度(Y)。當(dāng)Y時(shí)一個(gè)矩陣,x軸的刻度幅度從1到每一列在Y上的數(shù)字。 階梯(X,Y)表示了Y上的元素在X上的指定位置。X必須和Y是相同大小,如果Y是矩陣,X可以是一行或者一列矢量,比如length(X) = size(Y,1)。階梯(.,LineSpec)指定線的類型,標(biāo)記符號(hào),和曲線的顏色。(查看LineSpec獲取更多信息)階梯(.,'PropertyName',propertyvalue)產(chǎn)生階層曲線,申請(qǐng)指定的性能設(shè)置。查看Stairseries properties 來描述性能。階梯(axes_handle,.)運(yùn)用axes_handle繪制進(jìn)入坐標(biāo)軸

36、的目標(biāo)取代進(jìn)入的最近的坐標(biāo)軸目標(biāo)。h=stairs(.)返回運(yùn)行的stairseries的目標(biāo)來產(chǎn)生每一個(gè)矩陣的列。xb,yb = stairs(Y,.)不描繪曲線,但是返回矢量xb和yb,比如 plot(xb,yb) 產(chǎn)生階層曲線。Description(zeros)B = zeros(n) returns an n-by-n matrix of zeros. An error message appears if n is not a scalar.B = zeros(m,n) or B = zeros(m n) returns an m-by-n matrix of zeros.B =

37、zeros(m,n,p,.) or B = zeros(m n p .) returns an m-by-n-by-p-by-. array of zeros.Note   The size inputs m, n, p, . should be nonnegative integers. Negative integers are treated as 0. If any trailing dimensions are 0, output B does not include those dimensions.B = zeros(size(A) returns an ar

38、ray the same size as A consisting of all zeros.zeros(m, n,.,classname) or zeros(m,n,.,classname) is an m-by-n-by-. array of zeros of data type classname. classname is a string specifying the data type of the output. classname can have the following values: 'double', 'single', 'in

39、t8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', or 'uint64'.翻譯:B = zeros(n)返回一個(gè)n作為n矩陣的零矩陣。如果n不是一個(gè)數(shù)量就會(huì)出現(xiàn)一個(gè)錯(cuò)誤信息。B = zeros(m,n,p,.) 或者 B = zeros(m n p .)返回一個(gè) m-by-n-by-p-by-.的零陣列。(注釋:m, n, p, .輸入的大小應(yīng)該是正整數(shù),負(fù)整數(shù)會(huì)被看作是0.如果任何尾數(shù)大小是0,輸出B將

40、不包含這些大小。)B = zeros(size(A)返回一個(gè)包含所有零矩陣和A相同尺寸的陣列。zeros(m, n,.,classname) 或者 zeros(m,n,.,classname)是一個(gè)m-by-n-by-. 的數(shù)據(jù)類型名稱零陣列。列別名稱是排成一行的指定輸出數(shù)據(jù)類型。列別名稱可以有以下作用:'double', 'single', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int

41、64', 或者 'uint64'.Description(ones)Y = ones(n) returns an n-by-n matrix of 1s. An error message appears if n is not a scalar.Y = ones(m,n) or Y = ones(m n) returns an m-by-n matrix of ones.Y = ones(m,n,p,.) or Y = ones(m n p .) returns an m-by-n-by-p-by-. array of 1s.Note   The

42、size inputs m, n, p, . should be nonnegative integers. Negative integers are treated as 0.Y = ones(size(A) returns an array of 1s that is the same size as A. ones(m, n,.,classname) or ones(m,n,.,classname) is an m-by-n-by-. array of ones of data type classname. classname is a string specifying the d

43、ata type of the output. classname can have the following values: 'double', 'single', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', or 'uint64'翻譯:Y = ones(n)返回一個(gè)n作為n矩陣的1矩陣。如果n不是一個(gè)數(shù)量就會(huì)出現(xiàn)一個(gè)錯(cuò)誤信息。Y = ones(m,

44、n) 或者 Y = ones(m n)返回一個(gè)m作為n的1矩陣。Y = ones(m,n,p,.) 或者 Y = ones(m n p .)返回一個(gè)m-by-n-by-p-by-.陣列作為1矩陣。(注釋:m, n, p, .輸入的大小應(yīng)該是正整數(shù),負(fù)整數(shù)會(huì)被看作是0.)Y = ones(size(A)返回一個(gè)大小和A一樣的1矩陣。ones(m, n,.,classname)或者ones(m,n,.,classname) 是一個(gè)m-by-n-by-. 的數(shù)據(jù)類型名稱零陣列。列別名稱是排成一行的指定輸出數(shù)據(jù)類型。列別名稱可以有以下作用:'double', 'single&#

45、39;, 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 或者 'uint64'.Description(sawtooth)sawtooth(t) generates a sawtooth wave with period 2 for the elements of time vector t. sawtooth(t) is similar to sin(t), but creates a sawtooth wave with peaks of -1 and 1 instead of a sine wave. The sawtooth wave is defined to be -1 at multiples of 2

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論