Location:
Search - plot.l
Search list
Description: There are two files in the zip folder. bpsk_spread.m and jakesmodel.m
Steps for simulation:
1] Run jakesmodel.m first
2] Then run bpsk_spread.m .
3] Note that during the first run bpsk_spread.m has no rayleigh fading.This is because the corresponding code has been commented
4] The resulting performance is stored in BER_awgn.
5] Now uncomment the Rayleigh Fading code in bpsk_spread.m file.
6] Same time comment BER_awgn (line 112) and uncomment BER_ray variable.
7] Run the simulation.
To compare the perfromances of the receiver using DSSS plot the BER_awgn and BER_ray
>>semilogy([1:8],BER_awgn(1:8), g* )
hold on
semilogy([1:8],BER_ray(1:8), -.b* )
hold on
grid on
-There are two zip files in the folder. Bpsk_ spread.m and jakesmodel.m Steps for simulatio n : 1] Run jakesmodel.m first 2] Then run bpsk_spre ad.m. 3] Note that during the first run bpsk_spr ead.m has no Rayleigh fading.This is because th e corresponding code has been commented 4] The r esulting performance is stored in BER_awgn. 5] Now uncomment the Rayleigh Fading code in bpsk_ spread.m file. 6] Same time comment BER_awgn (l 112 produced mostly in developed areas) and uncomment BER_ray variable. 7] Run the simulation. To compare the perfromances of the receiver using DSSS plot and the BER_awgn BE R_ray
Platform: |
Size: 2837 |
Author: 朱振希 |
Hits:
Description: There are two files in the zip folder. bpsk_spread.m and jakesmodel.m
Steps for simulation:
1] Run jakesmodel.m first
2] Then run bpsk_spread.m .
3] Note that during the first run bpsk_spread.m has no rayleigh fading.This is because the corresponding code has been commented
4] The resulting performance is stored in BER_awgn.
5] Now uncomment the Rayleigh Fading code in bpsk_spread.m file.
6] Same time comment BER_awgn (line 112) and uncomment BER_ray variable.
7] Run the simulation.
To compare the perfromances of the receiver using DSSS plot the BER_awgn and BER_ray
>>semilogy([1:8],BER_awgn(1:8), g* )
hold on
semilogy([1:8],BER_ray(1:8), -.b* )
hold on
grid on
-There are two zip files in the folder. Bpsk_ spread.m and jakesmodel.m Steps for simulatio n : 1] Run jakesmodel.m first 2] Then run bpsk_spre ad.m. 3] Note that during the first run bpsk_spr ead.m has no Rayleigh fading.This is because th e corresponding code has been commented 4] The r esulting performance is stored in BER_awgn. 5] Now uncomment the Rayleigh Fading code in bpsk_ spread.m file. 6] Same time comment BER_awgn (l 112 produced mostly in developed areas) and uncomment BER_ray variable. 7] Run the simulation. To compare the perfromances of the receiver using DSSS plot and the BER_awgn BE R_ray
Platform: |
Size: 3072 |
Author: 朱振希 |
Hits:
Description: 外挂的Dll库尝试,可以打印空心汉字,单线体正在开发中-Dll library of plug-ins to try, you can print hollow Chinese characters, in-line precursors are being developed
Platform: |
Size: 4346880 |
Author: lili |
Hits:
Description: 1-D Shaw Problems: Finds the Tikhonov regularized solutions (L = I) for a variety of choices for alpha and generates a waterfall plot of the results
Platform: |
Size: 1024 |
Author: Jason Lam |
Hits:
Description: OFDM程序,这么安排矩阵的目的是为了构造共轭对称矩阵
共轭对称矩阵的特点是 在ifft/fft的矢量上 N点的矢量
在0,N/2点必须是实数 一般选为0
1至N/2点 与 (N/2)+1至N-1点关于N/2共轭对称- BPSK simulation using a carrier cosine wave with ISI
clc
close all
clear all
figure(1)
n=160
for i=1:n
data(i)= 2*round(rand)-1
end
create modulated BPSK signal
first expand the bit stream
exdata=[]
for i=1:length(data)
for rep=1:5
exdata= [exdata data(i)]
end
end
ts=.1
t=1:ts:80.9
carrier=cos(pi*t)
multiply expanded bitstream by cosine wave with carrier frequency
this is the BPSK that is to be transmitted over the channel
bpsk=carrier.*exdata
bpsk=[bpsk(length(bpsk)-1) bpsk(length(bpsk)) bpsk]
plot(bpsk)
generating the noise
p=rand(1,800)*2*pi
p=rand*2*pi
snr=10
r=sqrt(-1*(1/snr*log(1- rand)))
no = 5*(r.* exp(j*p))
no = (r.* exp(j*p))
value of alpha
al=rand+j*rand
al=1
Spreading channel with the alpha as the variable
for k=5:5:795
for l = 1:5
al=round(rand)+j*round(rand)
rec(k+l)=bpsk(k+l)+al*bpsk(k-5+l)
end
end
rxdata=rec+ no
begin demodulation
first multiply recie
Platform: |
Size: 6146048 |
Author: 卞敏捷 |
Hits:
Description: 用Matlab程序实现P阶Levinson-Durbin算法。以一个2阶自回归模型(参数为b0=1, a1=0, a2=0.81)和一个2阶滑动平均模型(参数为b0=1, b1=1, b2=1)为例,选取观测数据长度为1000,分别用一个AR(2)模型和一个AR(10)阶模型来估计其功率谱。设激励信号模型的高斯白噪声的均值为0,方差为1。用Levinson-Durbin算法迭代计算AR模型参数,并用估计出的AR模型参数画出观测信号的功率谱。并对Levinson-Durbin算法的性能进行分析。-Write a small MATLAB program that implements the pthorder Levinson-Durbin (L-D). Run/Test the program using a AR(2) process (b0=1,a1=0, a2=0.81) and an MA(2) (bn=1,1,1) process-about 1000 samples. Use L-D with p=2 (for the AR) and 10 (for the MA). Plot the AR spectra produced in the two cases with L-D. List the direct form and the reflection coefficients in a table. Profile the L-D (total number of computations for a pthorder
Platform: |
Size: 3072 |
Author: zf |
Hits:
Description: Like Matlab s scatter command, lscatter produces a scatter plot. Unlike scatter, it allows you to also use a vector of labels that are used instead of the usual uniform markers.
lscatter(x,y,l)
generates a scatter plot where label{i} is placed at the coordinate (x(i),y(i)), for all i.
The program accommodates a large number of options which make it easy to taylor the output to your needs. The included example script should help you get started.
Please comment if you like it or find it useful.
-Like Matlab s scatter command, lscatter produces a scatter plot. Unlike scatter, it allows you to also use a vector of labels that are used instead of the usual uniform markers.
lscatter(x,y,l)
generates a scatter plot where label{i} is placed at the coordinate (x(i),y(i)), for all i.
The program accommodates a large number of options which make it easy to taylor the output to your needs. The included example script should help you get started.
Please comment if you like it or find it useful.
Platform: |
Size: 44032 |
Author: zhou |
Hits:
Description: Generate a 3D point plot of L=(x,y,z) using the values in the vector c to
determine the color of each point. If c is empty, then z (column 3 of L)
is used to color the plot. The data points are sorted so that plot3 is
only called once for each group of points that map to the same color. The upper and lower limits of the color range (and the z axis) can be defined with crange. This is useful for creating a series of plots with the same
coloring. The colormap (but not the colorbar) is flipped upside down if
crange is given as [max min] instead of [min max]. The figure handle is
returned if an output argument is given.-Generate a 3D point plot of L=(x,y,z) using the values in the vector c to
determine the color of each point. If c is empty, then z (column 3 of L)
is used to color the plot. The data points are sorted so that plot3 is
only called once for each group of points that map to the same color. The upper and lower limits of the color range (and the z axis) can be defined with crange. This is useful for creating a series of plots with the same
coloring. The colormap (but not the colorbar) is flipped upside down if
crange is given as [max min] instead of [min max]. The figure handle is
returned if an output argument is given.
Platform: |
Size: 4096 |
Author: Jeff |
Hits:
Description: 采样频率
fs=10000
轴承外环故障信号
fid=fopen( bearingout.dat , r ) 故障
N=1024
xdata=fread(fid,N, int16 )
fclose(fid)
xdata=(xdata-mean(xdata))/std(xdata,1)
时域波形
figure(1)
plot(1:N,xdata)
xlabel( 时间 t/n )
ylabel( 电压 V/v )
db10小波进行4层分解
一维小波分解
[c,l] = wavedec(xdata,4, db10 )
重构第1~4层细节信号
d4 = wrcoef( d ,c,l, db10 ,4)
d3 = wrcoef( d ,c,l, db10 ,3)
d2 = wrcoef( d ,c,l, db10 ,2)
d1 = wrcoef( d ,c,l, db10 ,1)
- Sampling frequency fs = 10000 bearing outer ring fault signal fid = fopen (' bearingout.dat' , ' r' ) failure N = 1024 xdata = fread (fid, N, ' int16' ) fclose (fid ) xdata = (xdata-mean (xdata))/std (xdata, 1) time-domain waveform figure (1) plot (1: N, xdata) xlabel (' Time t/n' ) ylabel ( ' voltage V/v' ) db10 wavelet decomposition 4 layer one-dimensional wavelet decomposition [c, l] = wavedec (xdata, 4, ' db10' ) 1 ~ 4 reconstructed detail signal d4 = wrcoef (' d' , c, l, ' db10' , 4) d3 = wrcoef (' d' , c, l, ' db10' , 3) d2 = wrcoef (' d' , c, l, ' db10' , 2) d1 = wrcoef (' d' , c, l, ' db10' , 1)
Platform: |
Size: 1024 |
Author: 王飞 |
Hits:
Description: 一个平面框架有限元程序,fortran写得- THIS PROGRAM HAS PLOT OPTIONS BUILT INTO IT
THE PROGRAM IS BASED ON THE THEORY PRESENTED IN CHAPTERS 5 AND 6
OF THE TEXT WRITTEN BY D. L. LOGAN.
YOU MUST LINK FILE SUBG WITH THIS PROGRAM TO USE THE PLOT OPTION
PART OF THE PROGRAM.
IF YOU DO NOT WANT THE PLOT OPTION SECTIONS, PLACEAC IN COLUMN
ONE OF THESE STATEMENTS. THESE STATEMENTS ARE INDICATED BY* S
PLANE FRAME OR GRID PROGRAM OPTIONS
MAX NUMBER OF NODES IS 40 FOR DIMENSIONS GIVEN FOR BIGK
Platform: |
Size: 6144 |
Author: zhangyy |
Hits:
Description: PLOT RECEIVING END VOLTAGE (Vr/Vs) AS A FUNCTION OF (P/Po) FOR UNCOMPENSATED AS WELL AS L-C COMPENSATED LINES AT LOAD AT PARTICULAR LENGTH OF LINE.
TAKE Ø = 0, 0.866 LAG & 0.866 LEAD AND LEGTH OF TRANSMISSION LINE 200 KM, 400 KM & 500 KM.
EXPLAIN THE VOLTAGE VARIATION OF LINE.-PLOT RECEIVING END VOLTAGE (Vr/Vs) AS A FUNCTION OF (P/Po) FOR UNCOMPENSATED AS WELL AS L-C COMPENSATED LINES AT LOAD AT PARTICULAR LENGTH OF LINE.
TAKE Ø = 0, 0.866 LAG & 0.866 LEAD AND LEGTH OF TRANSMISSION LINE 200 KM, 400 KM & 500 KM.
EXPLAIN THE VOLTAGE VARIATION OF LINE.
Platform: |
Size: 245760 |
Author: manoj |
Hits:
Description: Write a program that reads as its inputs four pairs of (x, y) coordinates of the endpoints of two line segments P1P2 and P3P4. Your program should decide whether the two line segments have a common point. For this problem you may use matlab in order to plot and visually see whether the two line segments intersect. (Hint: you may find helpful to represent a line segment as L=a*P1+(1-a)P2 where a is a constant between 0 and 1)
Platform: |
Size: 1024 |
Author: yeah |
Hits:
Description: This the demo file for Rhors counter example: adaptive control for system with unmodeled dynamics, which show the lack of robustness of the traditional MRAC.
DoSims.m: This script initializes the model parameters, run the simulation, and plot all the results automatically.
L1Model_Rohrs.mdl:the implementation of L1 adaptive controller.
MracModel_Rohrs.mdl: the implementation of the traditional MRAC.
Refer to the following papers for background:
C.E. Rohrs, L. Valavani, M. Athans, and G. Stein, "Stability Problems of Adaptive Control Algorithms in the Pressence of Unmodeled Dynamics", 21st Conference on Decision and Control, Dec 1982.
Enric Xargay, Naira Hovakimyan and Chengyu Cao, "Benchmark Problems of Adaptive Control Revisited by L1 Adaptive Control", International Symposium on Intelligent Control and 17th Mediterranean Conference on Control and Automation, Thessaloniki, Greece, June 24-26, 2009, pp. 31-36.
-This is the demo file for Rhors counter example: adaptive control for system with unmodeled dynamics, which show the lack of robustness of the traditional MRAC.
DoSims.m: This script initializes the model parameters, run the simulation, and plot all the results automatically.
L1Model_Rohrs.mdl:the implementation of L1 adaptive controller.
MracModel_Rohrs.mdl: the implementation of the traditional MRAC.
Refer to the following papers for background:
C.E. Rohrs, L. Valavani, M. Athans, and G. Stein, "Stability Problems of Adaptive Control Algorithms in the Pressence of Unmodeled Dynamics", 21st Conference on Decision and Control, Dec 1982.
Enric Xargay, Naira Hovakimyan and Chengyu Cao, "Benchmark Problems of Adaptive Control Revisited by L1 Adaptive Control", International Symposium on Intelligent Control and 17th Mediterranean Conference on Control and Automation, Thessaloniki, Greece, June 24-26, 2009, pp. 31-36.
Platform: |
Size: 28672 |
Author: mo |
Hits:
Description: Thoughtworks公司面试题——MARS ROVERS问题火星探测器 C# 实现 VS2010工程,带界面展示!
一小队机器人探测器将由NASA送上火星高原,探测器将在这个奇特的矩形高原上行驶。
用它们携带的照相机将周围的全景地势图发回到地球。每个探测器的方向和位置将由一个x,y系坐标图和一个表示地理方向的字母表示出来。为了方便导航,平原将被划分为网格状。位置坐标示例:0,0,N,表示探测器在坐标图的左下角,且面朝北方。为控制探测器,NASA会传送一串简单的字母。可能传送的字母为: L , R 和 M 。 L ,和 R 分别表示使探测器向左、向右旋转90度,但不离开他所在地点。 M 表示向前开进一个网格的距离,且保持方向不变。假设以广场(高原)的直北方向为y轴的指向。
输入:首先输入的line是坐标图的右上方,假定左下方顶点的坐标为0,0。剩下的要输入的是被分布好的探测器的信息。每个探测器需要输入wo lines。第一条line 提供探测器的位置,第二条是关于这个探测器怎样进行高原探测的一系列说明。位置是由两个整数和一个区分方向的字母组成,对应了探测器的(x,y)坐标和方向。每个探测器的移动将按序完成,即后一个探测器不能在前一个探测器完成移动之前开始移动。-he Thoughtworks Company interview questions- MARS ROVERS Mars probe C# VS2010 project with interface shows!
The robot detector by a small team of NASA Mars plateau, the detector will be traveling on this strange rectangular plateau.
They carry the camera panoramic views of the surrounding terrain Figure is sent back to Earth. The direction and position of each of the detectors by an x, y-based coordinate diagram, and a representation of the geographical direction of letters represented. In order to facilitate navigation, the plains will be divided into a grid-like. Sample location coordinates: 0,0 N detectors in the lower left corner of the plot, and facing north. Control detectors, NASA will send a bunch of letters. The letters may be sent to: L , R and M . L , R , respectively, so that the detector rotated 90 degrees to the left, right, but does not leave his location. M is moved into a grid distance forward and changing the orientation. Assuming Square (plateau) straig
Platform: |
Size: 54272 |
Author: wanghu |
Hits:
Description: %白噪声及有色噪声序列的产生
clear all; close all;
L=500; %仿真长度
d=[1 -1.5 0.7 0.1]; c=[1 0.5 0.2]; %D、C多项式的系数(可用roots命令求其根)
nd=length(d)-1; nc=length(c)-1; %nd、nc为D、C的阶次
xik=zeros(nc,1); %白噪声初值,相当于ξ(k-1)...ξ(k-nc)
ek=zeros(nd,1); %有色噪声初值
xi=randn(L,1); %randn产生均值为0,方差为1的高斯随机序列(白噪声序列)
for k=1:L
e(k)=-d(2:nd+1)*ek+c*[xi(k);xik]; %产生有色噪声
%数据更新
for i=nd:-1:2
ek(i)=ek(i-1);
end
ek(1)=e(k);
for i=nc:-1:2
xik(i)=xik(i-1);
end
xik(1)=xi(k);
end
subplot(2,1,1);
plot(xi);
xlabel('k'); ylabel('噪声幅值'); title('白噪声序列');
subplot(2,1,2);
plot(e);
xlabel('k'); ylabel('噪声幅值'); title('有色噪声序列');
Platform: |
Size: 763 |
Author: kristaleebom |
Hits:
Description: ofdm Theroretical ecpression of Probability of Detection refer above reference.
thresh = (qfuncinv(Pf)./sqrt(L))+ 1
Pd_the = qfunc(((thresh - (snr + 1)).*sqrt(L))./(sqrt(2).*(snr + 1)))
plot(Pf, Pd_the, r- )
xlabel( probability of false alarm )
ylabel( probability of detection )
hold on
grid on
-ofdm Theroretical ecpression of Probability of Detection refer above reference.
thresh = (qfuncinv(Pf)./sqrt(L))+ 1
Pd_the = qfunc(((thresh - (snr + 1)).*sqrt(L))./(sqrt(2).*(snr + 1)))
plot(Pf, Pd_the, r- )
xlabel( probability of false alarm )
ylabel( probability of detection )
hold on
grid on
Platform: |
Size: 454656 |
Author: visionbhagya |
Hits:
Description: 置信区间阴影图CONFPLOT is a linear plot utility, extending ERRORBAR to represent continuous confidence/error boundaries as a shaded gray area around the plotted line (i.e. taking advantage of the command area ).-CONFPLOT is a linear plot utility, extending ERRORBAR to represent continuous confidence/error boundaries as a shaded gray area around the plotted line (i.e. taking advantage of the command area ).
CONFPLOT(X,Y,L,U) plots the graph of vector X vs. vector Y with continuous confidence/error boundaries specified by the vectors L and U. L and U contain the lower and upper error ranges for each point in Y. The vectors X,Y,L and U must all be the same length.
Platform: |
Size: 80896 |
Author: nana |
Hits: