韩国留学生考试题
<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> >> A=10 % A is a scalar whose value is equal to 10.<br> >> A=4;<br> >> B=10;<br> >> A<br> >> A+B<br> >> A=2;B=5;C=A+5</P>
<P>Vector Calculation<br>>>B=1:5 <br>>>B= <br>>>B=-4:2:6 <br>>>A=;B=;C=A+B;<br>>>A<br>>>B<br>>>C<br>>> who<br>>> whos<br>>> clear<br>>> who</P>
<P>Matrix manipulation<br>>>A=[ 2 1 3; 4 5 6; 7 2 3] <br>>>B=<br> >>C=<br> >> B’<br> >> C’<br> >> D=B’;E=C’;<br> >>F=<br> >>G= <br> >>H=F-G<br> >> H=F+G<br>>> H=F.*G<br> >> H=F./G<br> >> H=F*G<br> >> H=A*F<br> >> H=A.^2<br>>> H=F.^2<br>>> H=A^2<br>>> H=F^2<br>>> H=2.^B<br>>> H=2.^C<br>>> H=G.^2 +3*F+G <br><br>Matrix(Vector) manipulation<br>>> A=;<br>>> A(1)<br>>> A(2)<br>>> A(3)<br>>>B=A(2:4)<br>>>B=A(1:4)<br>>> A=rand(8,5)<br>>> help rand<br>>> A<br>>> A(2,4)<br>>> A(8,5)<br>>> A(1,:)<br>>> B=A(4,:)<br>>> A(:,1)<br>>> A(:,5)<br>>> C=A(2:4,:)<br>>> D=A(:,);<br>>> max(A)<br>>>=max(A)<br>>> mean(A)<br>>> max(mean(A))<br>>> max(max(A))<br>>> A=rand(2,2); <br>>> inv(A)<br>>> help inv<br>>>A^(-1)</P>
<P>Basic Math functions and plot<br>>> A=0:3<br>>> B=2.^A<br>>> log2(B)<br>>> x=0:0.1:10;y=sin(x); <br>>> plot(x)<br>>> plot(y)<br>>> figure<br>>> plot(x,y)<br>>> y2=cos(x);<br>>> y3=<br>>> plot(x, y3)<br>>> axis()<br>>> help plot<br>>> 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>>> 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编辑过]
<P>看到有这样的问题真是痛心</P>
回复:(mywife1983)韩国留学生考试题,请教一下各位...
这不都是最基本的命令吗?<BR><BR>方法一<BR>用doc查看命令帮助<BR><BR>方法二<BR>随便找本matlab书看一下<BR>比如:《精通Matlab6.5 (张志涌)》回复:(flybaly)看到有这样的问题真是痛心
<DIV class=quote><B>以下是引用<I>flybaly</I>在2006-5-22 20:31:57的发言:</B><BR><P>看到有这样的问题真是痛心</P></DIV>
<br>呵呵~~没办法,我发现在论坛的问题很多都是这种<BR>或者就是针对本身专业问题的,并非matlab实现的问题
页:
[1]