mywife1983 发表于 2006-5-22 18:24

韩国留学生考试题

<P>Matlab Basics and Some useful coding for OFDM simulator design </P>
<P>Task 1.Execute the following commands in matlab command line and attach the detail explanation to what happens in each execution. </P>
<P>1. Scalar Calculation   <br>   &gt;&gt; A=10   % A is a scalar whose value is equal to 10.<br>   &gt;&gt; A=4;<br>   &gt;&gt; B=10;<br>   &gt;&gt; A<br>   &gt;&gt; A+B<br>   &gt;&gt; A=2;B=5;C=A+5</P>
<P>Vector Calculation<br>&gt;&gt;B=1:5      <br>&gt;&gt;B= <br>&gt;&gt;B=-4:2:6   <br>&gt;&gt;A=;B=;C=A+B;<br>&gt;&gt;A<br>&gt;&gt;B<br>&gt;&gt;C<br>&gt;&gt; who<br>&gt;&gt; whos<br>&gt;&gt; clear<br>&gt;&gt; who</P>
<P>Matrix manipulation<br>&gt;&gt;A=[ 2 1 3; 4 5 6; 7 2 3]   <br>&gt;&gt;B=<br>   &gt;&gt;C=<br>   &gt;&gt; B’<br>   &gt;&gt; C’<br>   &gt;&gt; D=B’;E=C’;<br>   &gt;&gt;F=<br>   &gt;&gt;G= <br>   &gt;&gt;H=F-G<br>   &gt;&gt; H=F+G<br>&gt;&gt; H=F.*G<br>   &gt;&gt; H=F./G<br>   &gt;&gt; H=F*G<br>   &gt;&gt; H=A*F<br>   &gt;&gt; H=A.^2<br>&gt;&gt; H=F.^2<br>&gt;&gt; H=A^2<br>&gt;&gt; H=F^2<br>&gt;&gt; H=2.^B<br>&gt;&gt; H=2.^C<br>&gt;&gt; H=G.^2 +3*F+G <br><br>Matrix(Vector) manipulation<br>&gt;&gt; A=;<br>&gt;&gt; A(1)<br>&gt;&gt; A(2)<br>&gt;&gt; A(3)<br>&gt;&gt;B=A(2:4)<br>&gt;&gt;B=A(1:4)<br>&gt;&gt; A=rand(8,5)<br>&gt;&gt; help rand<br>&gt;&gt; A<br>&gt;&gt; A(2,4)<br>&gt;&gt; A(8,5)<br>&gt;&gt; A(1,:)<br>&gt;&gt; B=A(4,:)<br>&gt;&gt; A(:,1)<br>&gt;&gt; A(:,5)<br>&gt;&gt; C=A(2:4,:)<br>&gt;&gt; D=A(:,);<br>&gt;&gt; max(A)<br>&gt;&gt;=max(A)<br>&gt;&gt; mean(A)<br>&gt;&gt; max(mean(A))<br>&gt;&gt; max(max(A))<br>&gt;&gt; A=rand(2,2); <br>&gt;&gt; inv(A)<br>&gt;&gt; help inv<br>&gt;&gt;A^(-1)</P>
<P>Basic Math functions and plot<br>&gt;&gt; A=0:3<br>&gt;&gt; B=2.^A<br>&gt;&gt; log2(B)<br>&gt;&gt; x=0:0.1:10;y=sin(x); <br>&gt;&gt; plot(x)<br>&gt;&gt; plot(y)<br>&gt;&gt; figure<br>&gt;&gt; plot(x,y)<br>&gt;&gt; y2=cos(x);<br>&gt;&gt; y3=<br>&gt;&gt; plot(x, y3)<br>&gt;&gt; axis()<br>&gt;&gt; help plot<br>&gt;&gt; help axis<br><br>Task 2.Follow the following procedures and execute the mfile (matlab script file). Give the detail explanation for each line.</P>
<P>1). Edit the following subscript file by using matlab editor and save it with your own filename “***.m”</P>
<P>clear<br>x=0:0.1:10;<br>for t=1:8<br>   a=t/10;<br>   if (a==0.6)<br>      a=0.62;<br>   end<br>   y(t,:)=x.*sin(a*x);<br>end <br>plot(x,y)<br>xlabel('x')<br>ylabel('y=x sin (ax)')<br>legend( 'a=0,1', 'a=0.2', 'a=0.3', 'a=0.4', 'a=0.5', 'a=0.62', 'a=0.7', 'a=0.8')</P>
<P>2).At the matlab command line, execute script file by typing as follows<br>&gt;&gt; bbiriri<br>.</P>
<P>Task 3. Following aresome useful matlab coding examples for OFDM system design. Execute the following commands or script (m-file) and attach the detail explanation to each line.</P>
<P>sine wave form generation<br>Ts=2;<br>step=0.001;<br>t=0:step:Ts;<br>Ns=10;<br>for n=1:16<br>   sub_carrier(n,:)=exp(j*2*pi*n*t);<br>end<br>plot(t, real(sub_carrier))<br><br><br>Numerical integration : you can numerically calculate an integration of an arbitrary function over interval . This will be required for OFDM demodulation </P>
<P>%Exampleintegration 1/(x^2+1) over [-2 4], You will get S equal to the integration result.</P>
<P>step=0.001;<br>a=-2;<br>b=4;<br>x=a:step:b;<br>ft=1./(x.^2 +1);<br>S= sum(ft)*step;</P>
<P><br>Vector(or matrix) concatenation) : will be required for Guard time insertion and OFDM symbol concatenation <br>a=;<br>b=;<br>c=<br><br>convolution : will be required forchannel modeling <br>ht=[ 1 2 3 2 1];<br>xt=[ 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0.5 0 0];<br>yt=conv(xt,ht)<br>plot(yt)<br></P>
[此贴子已经被aspen于2006-5-22 20:34:30编辑过]

flybaly 发表于 2006-5-22 20:31

<P>看到有这样的问题真是痛心</P>

happy 发表于 2006-5-22 20:32

回复:(mywife1983)韩国留学生考试题,请教一下各位...

这不都是最基本的命令吗?<BR><BR>方法一<BR>用doc查看命令帮助<BR><BR>方法二<BR>随便找本matlab书看一下<BR>比如:《精通Matlab6.5 (张志涌)》

happy 发表于 2006-5-22 20:33

回复:(flybaly)看到有这样的问题真是痛心

<DIV class=quote><B>以下是引用<I>flybaly</I>在2006-5-22 20:31:57的发言:</B><BR>
<P>看到有这样的问题真是痛心</P></DIV>
<br>呵呵~~没办法,我发现在论坛的问题很多都是这种<BR>或者就是针对本身专业问题的,并非matlab实现的问题
页: [1]
查看完整版本: 韩国留学生考试题