声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 945|回复: 3

韩国留学生考试题

[复制链接]
发表于 2006-5-22 18:24 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
<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=[2 1 4 3] <br>&gt;&gt;B=-4:2:6     <br>  &gt;&gt;A=[1:4];B=[3 2 5 6];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=[1:3]<br>   &gt;&gt;C=[3 2 5 ]<br>   &gt;&gt; B’<br>   &gt;&gt; C’<br>   &gt;&gt; D=B’;E=C’;<br>   &gt;&gt;F=[D E]<br>   &gt;&gt;G=[C’ B’] <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=[3 4 1 2 4];<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(:,[1 3 5]);<br>&gt;&gt; max(A)<br>&gt;&gt;[T1 T2]=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=[y’ y2’]<br>&gt;&gt; plot(x, y3)<br>&gt;&gt; axis([0 20 -2 2])<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 are  some 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 [a b]. This will be required for OFDM demodulation </P>
<P>%Example  integration 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=[1 2 4];<br>  b=[4 5 6];<br>  c=[a b]<br>  <br>convolution : will be required for  channel 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编辑过]

回复
分享到:

使用道具 举报

发表于 2006-5-22 20:31 | 显示全部楼层
<P>看到有这样的问题真是痛心</P>
发表于 2006-5-22 20:32 | 显示全部楼层

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

这不都是最基本的命令吗?<BR><BR>方法一<BR>用doc查看命令帮助<BR><BR>方法二<BR>随便找本matlab书看一下<BR>比如:《精通Matlab6.5 (张志涌)》
发表于 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实现的问题
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-9-25 15:25 , Processed in 0.058346 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表