Search Engine **www.edaboard.com**

107 Threads found on edaboard.com: **Grid Matlab**

I'm a beginner in FDTD programing.
Anyone have a **matlab** code to solve the irregular **grid** problem??
THX

Electromagnetic Design and Simulation :: 10.02.2003 12:39 :: ppAntenna :: Replies: **21** :: Views: **20998**

little **matlab** demo of fractional derivative..enjoy
N=256;
t=pi*/N;
f=exp(-(t.^2)/(0.5));
f=f-mean(f);
F=fftshift(fft(f));
figure(1);clf;set(gcf,'Renderer','zbuffer');
for n=0:0.1:4
Fn=(j*t).^n .* F;
fn=ifft(fftshift(Fn));fn=fn/max(abs(fn));plot(real(fn));
text(20,1.0,sprintf('%0.2f',n));
**grid** on;axis( [0 2*N -1.

RF, Microwave, Antennas and Optics :: 18.04.2003 18:24 :: rntsay :: Replies: **6** :: Views: **4976**

little **matlab** demo for fractional fft...enjoy
N=64;
t=2*pi/N*;c=1;
for k=-N/2:N/2 B(c,:)=1/sqrt(N+1)*exp(-j*k*t);c=c+1;end;
f=exp(-t.^2);
f=f-min(f);
f=f';
figure(1);clf;set(gcf,'Renderer','zbuffer');
for n=0:0.1:2.0
Bn=B^n;fn=abs(Bn*f);plot(fn,'b');hold on;plot(f,'r--');hold off;
text(10,1.7,sprintf('%0.2f',n));

RF, Microwave, Antennas and Optics :: 18.04.2003 18:25 :: rntsay :: Replies: **0** :: Views: **1694**

Hi,
I think you may have a problem with that, since **matlab** hasn't 3D polar plot instruction.
However I use a spherical triangular **grid** (either imported as ASCII from any 3D graphing tool, or generated manually) then use PATCH3 instruction to plot the triangles with the color being proportional to the radiation intensity (or gain in that dire

RF, Microwave, Antennas and Optics :: 08.04.2005 06:14 :: adel_48 :: Replies: **3** :: Views: **7874**

I do have a S(f) calculated and now I made a x-y coordinate system using this code
subplot(2,2,1);
semilogx(f,real(S11));
xlabel('Frequency');
ylabel('Real(S11)');
title('Real(S11) = Real(S22)');
**grid**;
As a figure I get empty drawing so i'm interested how to plot the line for the S that i have calculated.What is the co

Software Problems, Hints and Reviews :: 26.04.2005 13:50 :: Meklaud :: Replies: **4** :: Views: **1403**

There are several aspects of this. The first is the legal aspect. The owner of your power **grid** may need to give you specific permission to do this.
The technical aspects are just the same as for a steam generated power plant. You have to adjust the voltage and phase angle relative to the **grid** to make real (not reactive) power flow into the

Embedded Systems and Real-Time OS :: 15.05.2005 18:18 :: flatulent :: Replies: **7** :: Views: **1818**

I'm facing problems trying to implement an algorithm i have been thinking in **matlab**...
Here's what i want to do...
I have a number of cells(say n cells) (or cities, or points or whatever). The cells are not all connected each other. Some cells are connected with some neighbor cells but no one else. I know the connections. What i want to do is t

Electronic Elementary Questions :: 07.08.2005 10:02 :: ramone :: Replies: **1** :: Views: **746**

/******************************************************************************/
/* MAIN_C
/******************************************************************************/
#include
#include "**grid**Tree.h"
/* THE **grid**
|-----------------------------------------------
| |

Electronic Elementary Questions :: 12.08.2005 13:30 :: ramone :: Replies: **5** :: Views: **868**

hi
i ran your program in **matlab** 7 and it worked successfully.
i think error belong to "angle" because it is one of **matlab** functions.
use:
r = 1.2; theta = 10*pi/180;
ang = 0:theta:36*theta; mag = r.^(ang/theta);
polar(ang,mag)
**grid**
title('Polar Plot')

Electronic Elementary Questions :: 09.01.2006 00:47 :: hr_rezaee :: Replies: **5** :: Views: **12025**

there is an example
x=0:10:1e6;
semilogx(x,log10(x));**grid**;

Mathematics and Physics :: 28.01.2006 16:55 :: Roshdy :: Replies: **10** :: Views: **734**

I think you should first solve for I as a function of V. Then you can use that to write an expression in **matlab**. Once you get that expression and write I=f(V) then you are basically done. The following code (with an appropriate expression on the right hand side of I= ) should do it.
V=;
I=
plot(V,I),**grid**

Electronic Elementary Questions :: 02.03.2006 13:16 :: v_c :: Replies: **3** :: Views: **733**

Dear all,
This is a part of sigma-delta modulator code in **matlab**.
tr = 1024*4; % points for transient
pt = 1024*32; % FFT points
tt = tr+pt; % total points
osr = 64; % osr=64
fc = 20000; % signal bandwidth = 4k
fs = 2*fc*osr; % sampling frequency

Analog Circuit Design :: 08.04.2006 09:55 :: shaq :: Replies: **2** :: Views: **1135**

I have to solve sub **grid**(irregular) fdtd with **matlab**.
I hope some one can upload this code.
Please~~~~~~!!!

Electromagnetic Design and Simulation :: 01.05.2006 09:35 :: upquark :: Replies: **1** :: Views: **1421**

Hi all
I've a question about ADC TEST.
I received **matlab** code for logic analyzer's data in MAXIM Homepage.
But I'm confused about that.
In code...
.
.
.
figure;
plot(,code);
title('TIME DOMAIN')
xlabel('SAMPLES');
ylabel('DIGITAL OUTPUT CODE');
Dout=code-(2^numbit-1)/2; %Re-center the digitized sinusoidal input
Dout

Analog Circuit Design :: 15.06.2006 10:48 :: ljy4468 :: Replies: **0** :: Views: **1782**

Xc= 2; %Center for x
Yc = 3; %Center for y
R = 2; %This is the radius
x=0:0.01:1; %degree
plot(Xc+R*cos(2*pi*x),Yc+R*sin(2*pi*x));%the circle plot
**grid**

Digital Signal Processing :: 04.09.2006 03:54 :: amine :: Replies: **3** :: Views: **9157**

Your code is close but had a few errors. Here is the working code.
close all;
clear all;
reg1 =0;
reg2 =0;
reg3 = 0;
eta =sqrt(2)/2;
theta =2*pi*1/100;
Kp = ;
Ki = ;
d_phi_1 = 1/20;
n_data = 100;
for nn =1:n_data
phi1= reg1 +d_phi_1;
phi1_reg(nn) = phi1;
s1 =exp

Digital communication :: 14.06.2011 17:54 :: power-testing :: Replies: **5** :: Views: **10644**

Hi all, I want to plot an i-v curve of this equation i=100*^2 by using **matlab**, but unfortunately it looks that the plot I get isn?t the one that I want, so I think there must be something wrong but I don?t know it. Your suggestions and comments will be highly appreciated!
Here is my code:
%current versus voltage cur

Mathematics and Physics :: 19.11.2006 22:43 :: qiushidaren :: Replies: **1** :: Views: **3348**

fs=50;
fcut1=10;
fcut2=5;
w1=2*fcut1/fs;
w2=2*fcut2/fs;
=butter(2,w1);
=butter(2,w2,'high');
=freqz(b,a,100,fs);
=freqz(b1,a1,100,fs);
kfr=abs(h);
kfr1=abs(h1);
subplot(2,1,1),plot(kfr);**grid**;
subplot(2,1,2),plot(kfr1);**grid**;

Electronic Elementary Questions :: 21.02.2007 04:29 :: shahar :: Replies: **4** :: Views: **1975**

In this example, we shall simulate the shapes of the electrocardiogram for both
The following commands create an electrocardiogram
signal heart might produce assuming a 4000 Hz sampling rate.
The heart rate for this signal is approximately 89 beats per minute, and the
peak voltage of the signal is 3.5 millivolts.
x1 = 3.5*ecg(2700).';
y1 = s

Digital Signal Processing :: 12.05.2007 18:41 :: farhadtehrani :: Replies: **6** :: Views: **10192**

my project is about FIR filter design by the FFT algorithm,
I have some problem in writing code in **matlab**.
if any body could help me I'll really be tankful.
please copy paste this code in your **matlab** software(ver.7) & run it.
f = ; m = ;
h(:,1) = fir2(31,f,m) ; %time domain FIR filter
plot(b);
hold on
plot(I,h(

Digital Signal Processing :: 02.05.2007 12:06 :: speech :: Replies: **0** :: Views: **1665**

x and z are RV of gaussiana distribution and not correlated,
y is a RV of a gaussiana distribution and correlated with x
n=2^13;
x=randn(1,n)+3;
z=randn(1,n)+4;
y=zeros(1,n);
m=50;
for i =1:n-m
y(i)=mean(x(i:i+m-1));
end
plot(); **grid**
The density function:
=hist(x,50);
fx=fx/sum(fx);
=hist(y,50)

Digital communication :: 24.06.2007 22:28 :: artsil23 :: Replies: **5** :: Views: **3350**

figure(1);plot(x,y)；**grid** on;
figure(2);polar(x,y);**grid** on;

Electromagnetic Design and Simulation :: 28.10.2007 20:26 :: handoctor :: Replies: **2** :: Views: **4260**

Hi,
Could some one please elaborate if it is possible to 'not' have the figure window show up before a jpeg file creation (using print -djpeg command)?
If used in a loop, the plot command takes a long time in creating the window on every iteration on the screen, when all I really want is to create a jpeg file afterwards.
Thanks,
/Hunter

Digital Signal Processing :: 20.11.2007 10:52 :: hunter694 :: Replies: **2** :: Views: **798**

Microcontrollers :: 05.03.2008 03:32 :: Sreya39 :: Replies: **1** :: Views: **1358**

Hi x:
x(1:12)=0;
x(13:17)=1;
x(18:29)=0;
n=-14:14;
stem(n,x,'.'); **grid**;
axis()
For X(ejw):
W=-2*pi:1e-4:2*pi;
plot(W,sin(2.5*W)./sin(W/2));

Software Problems, Hints and Reviews :: 03.07.2008 17:46 :: saeidj :: Replies: **2** :: Views: **927**

Hi all
I want to **grid** (FEM 2-D) a geometry that is bounded with a function (defined in a mfile) in **matlab**. in pde of **matlab** it is described with command "initmesh" but this command did not recognize my function.
I want to know the user defined function must have what properties?

Software Problems, Hints and Reviews :: 10.07.2008 15:13 :: hisa :: Replies: **0** :: Views: **1259**

We can plot the magnitude/phase and mark the phase margin / gain margin of a system with following command
phase (sys)
But the defaust unit used in the plot is rad/sec. and the **grid** line is default off.
1. How to program to set the unit to Hz directly?
2. How to program to set the **grid** line is on?

Analog IC Design and Layout :: 05.11.2008 23:47 :: hmsheng :: Replies: **0** :: Views: **1547**

hi see my code here (i attached this code many times)
clc;
clear all;
disp('M-Array PSK Modulation')
%create a random digital message
M=input ('M= '); %alphabet size
x=randint(input('Number of binary bit stream = '),1,M);
%%
%%
nsample=40; %oversampling rate.
%%
%%
%use M-PSK modulation to produce y
y=modulate(modem.pskmod(M),x);
%%

Digital communication :: 26.02.2009 16:39 :: Aya2002 :: Replies: **1** :: Views: **1368**

Hi dear see this (my program)
clc;
clear all;
disp('M-Array PSK Modulation')
%create a random digital message
M=input ('M= '); %alphabet size
x=randint(input('Number of binary bit stream = '),1,M);
nsample=40; %oversampling rate.
%%
%%
%use M-PSK modulation to produce y
y=modulate(modem.pskmod(M),x);
%%
%follow with rectangular p

Digital communication :: 26.02.2009 16:00 :: Aya2002 :: Replies: **9** :: Views: **20303**

Hi experts, i have a quistion here, please read the following paragragh as it is in a pdf document on the web:
The Fourier transform can be computed using the **matlab** code
Fk = fft(fn)/N; % The FFT of the signal fn
fn = ifft(Fk)*N; % The Inverse FFT
ifft(fft(fn)); % This result = fn (within machine precision)
We must divide by the number of

Digital Signal Processing :: 11.03.2009 19:20 :: Aya2002 :: Replies: **5** :: Views: **8612**

clc;clear all;
%create a random digital message
M=64; %alphabet size
x=randint(100e3,1,M);
%%
%use 16-QAM modulation to produce y
y=modulate(modem.qammod(M),x);
%%
%%transmit signal through an AWGN Channel
ynoisy=awgn(y,27,'measured');
%%
%Create scattet plot from noisy data
scatterplot(ynoisy),**grid**;
%%
%Demodulate ynoisy to recover t

Digital Signal Processing :: 23.04.2009 15:30 :: Aya2002 :: Replies: **1** :: Views: **1716**

In a **matlab** code, i have to finde the symbol error rate of 32qam modulation with awgn and SNR from -30 to 30 and step 5. But the figure apears wrong. Can somebody tell me what i made wrong in the code???
clear
N=10^4;
M=32;
for SNR=-30:5:30
x1=randint(1,N,M);
y1=qammod(x1,M);
for t=1:N
awgn1 =awgn(y1,SNR,'measur

Digital communication :: 09.06.2009 08:34 :: groun :: Replies: **3** :: Views: **2645**

Yes **matlab** is the best tool for simulating antenna arrays; Below i have typed some **matlab** code to simulate liner antenna array.
change the different variable and see the results.
%********************************
clc
clear all
f=2000;
c=340;
d=.08;
N=10;
theta= 45 * (pi/180);
si=0:pi/100:pi;
for k=1:101
peak(k)=(sin(N*f*d*pi*(cos(

Electromagnetic Design and Simulation :: 26.07.2009 00:26 :: engr_najam :: Replies: **6** :: Views: **1978**

Here i hav written a small code to plot ur data, hope it will help
clc
clear all
fid=fopen('C:\Documents and Settings\Zeeshan\Desktop\a.txt');
data=fread(fid,inf,'int16');
figure(1)
plot(data(1:100))
**grid** on
fclose(fid);

Digital Signal Processing :: 28.07.2009 12:59 :: engr_najam :: Replies: **8** :: Views: **6080**

function askd(g,f)
%Modulation ASK
%Example:
%askd(,2)
objectId=14328&objectType=FILE
if nargin >2
error('Too many input arguments')
elseif nargin ==1
f=1;
end
if f<1;
error('Frequency must be bigger than 1')
end
t=0:2*pi/99:2*pi;
cp=;sp=;
mod=;mod1=;bit=;
for n=1:length(g);
if g(n)==0;

Digital communication :: 02.09.2009 23:03 :: baya :: Replies: **1** :: Views: **1127**

Hi, I have a **matlab** code here
it acquires FM modulated signal from sound card can perform FM demodulation
however, i don't why it set vcok (VCO K constant) at 0.176
anyone can explain to me how and why it is set to 0.176?
Fc = 2144; %select VCO carrier frequency
vcok = 0.176; %select vco constant
Fs = 40000; %select sound card sampl

Digital communication :: 06.09.2009 09:47 :: yiyi87 :: Replies: **0** :: Views: **3455**

The following program is not showin the frequency properly that is supposed to be got by fft. please help.
clear all;clc;close all;
fs=1e3;
t=(0:fs)'/fs*10;
f=30;
x=sin(2*pi*f*t);
xf=fft(x);
plot(t,x);
hold on
plot(t,xf,'r');
**grid** on; axis tight; zoom on;

Digital Signal Processing :: 18.09.2009 11:37 :: mayavi :: Replies: **1** :: Views: **1131**

hello everybody...
can i ask something...
how ca i change this command to display the magnitude spectrum??
this command has show low pass filter..
case 1
if(wp>ws)
handle=errordlg('wp must be less than ws for lowpass filter','guifilter_design');
return;
end
=buttord(wp,ws,rp,rs,

Digital Signal Processing :: 13.10.2009 20:17 :: awanis :: Replies: **0** :: Views: **579**

clc;
clear all;
disp('M-Array ASK Modulation')
%create a random digital message
M=input ('M= '); %alphabet size
x=randint(input('Number of binary bit stream = '),1,M);
nsample=40; %oversampling rate.
%%
%%
%use M-ASK modulation to produce y
y=modulate(modem.qammod(M),x);
%%
%follow with rectangular pulse shaping.
ypulse=rectpulse(y,n

Digital communication :: 30.12.2009 10:00 :: Aya2002 :: Replies: **5** :: Views: **11834**

see this code for QAM, you can modify it as your request:
clc;clear all;
%create a random digital message
M=64; %alphabet size
x=randint(100e3,1,M);
%%
%use 16-QAM modulation to produce y
y=modulate(modem.qammod(M),x);
%%
%%transmit signal through an AWGN Channel
ynoisy=awgn(y,27,'measured');
%%
%Create scattet plot from noisy data
s

Digital communication :: 30.12.2009 09:45 :: Aya2002 :: Replies: **9** :: Views: **18928**

I need **grid** based clustering algorithm (code) for **matlab** (or C++).. I can't find it anywhere... Please help.. Something simple that works.. STING, WaveCluster, Clique, Opti**grid** or something else..
I'm writing a paper about **grid** based clustering and I need to attach code to show how it works.. If anyone knows, please (...)

Digital Signal Processing :: 07.02.2010 15:40 :: sanjushka :: Replies: **2** :: Views: **2213**

I think the good point to start you is with the DC/DC converter control.... then move to Inverter Control and then **grid** synchronization.

Power Electronics :: 10.02.2010 12:15 :: mess123 :: Replies: **4** :: Views: **1429**

this is the bpsk code i tried in **matlab**.. but no output... plz help...
for j=1:7
eb1(j)=j;
no=1;
eb2(j)=10.^(eb1(j)/10);
a=sqrt(eb2(j)/4);
%s=;
s1=;
s2=;
psi=;
x=0;
for i=1:10000
d=randint(i);
if d==1
s=s1;
else
s=s2;
end
n=randn(1,4);
n1=n*sqrt(no/2);
r=s+n1;
z

Digital communication :: 28.02.2010 04:17 :: gkr :: Replies: **3** :: Views: **1711**

This is a program in **matlab** to do the DFT and the FFT (2-sided and 1-sided)
Good luck
%FFT lecture.
clc;close all; clear all;
%Generate the sine wave sequences
fs=8000; % sampling rate
N=1000; % Number of data points.
x=2*sin(2000*pi*/fs) ;
figure(1) ;
stem( 1 : 1:N/10,x( 1 : 1 :N/10 ) ,'filled' ) ;%plot first 100 sample of x(n)

Digital Signal Processing :: 17.03.2010 17:44 :: Aya2002 :: Replies: **8** :: Views: **20965**

this is a simple code for M - PSK modulation
try it, if you need other help, contact me or you can join our groups:
and the second
%adding a rectangular pulse shaping;
clc;
clear all;close all;
disp('M-Array PSK Modulation')

Digital communication :: 10.05.2010 15:24 :: Aya2002 :: Replies: **4** :: Views: **2454**

Hello
I m trying to estimate time delay between signals using cross correlations.
Unfortunately I ve encountered a few problems I m unable to handle.
Here is code what I ve done. According to article I ve read it is supposed to be working.
I m expecting at the last figure, one peak which should indicate a delay between signals x1, and xr, but

Digital Signal Processing :: 10.04.2010 19:29 :: syrioosh :: Replies: **0** :: Views: **2836**

I think you are right.
I did a simulation for a CDMA system and i have faced the same problem.
by the way:
I changed the following lines:
at the first I added
clc;
close all;
clear all;
the signal to noise ratio become
SNR = 0:.2:20; % Range of SNR values, in dB.
to make the figure more smoth.
and the reset was canceled as

Digital communication :: 13.04.2010 12:03 :: Aya2002 :: Replies: **7** :: Views: **3556**

hi this is pradeep doing mtech in nit.i want **matlab**/simulink model for pv sytem.please send mdl file to my email

Analog Circuit Design :: 26.04.2010 06:01 :: pradeep kumar p :: Replies: **0** :: Views: **1777**

Please give me the description for the code below.
This is based on baby cry detection. that is finding the pitch of the baby cry and controlling the cradle accordingly
*******************************************************************
x=fft(double(y));
z=length(x);
z1=int16(z/8000);
z2=z1*150;
z3=z1*200;
z4=z1*900;
m = abs(x(5:

Digital Signal Processing :: 13.05.2010 10:12 :: mkirankumar :: Replies: **0** :: Views: **1029**

Use the following code for creating a low pass filter :
Determine the cut off frequency and change Fc appropriately
Fc = 500 ; %cut off frequency
w = Fc/(2*fs); % Normalized frequency
%design a low pass fitler with above mentioned specifications
=butter(5,w,'low'); %5th order butterworth LPF
=freqz(b,a,1024); %Frequency response

Digital Signal Processing :: 25.05.2010 06:03 :: mathuranathan :: Replies: **6** :: Views: **16734**

Last searching phrases:

step motors | power synthesis | simulink fir | pisoiu | subsystem | impedance matching antenna | transistor sheet | sensor counter | pwm lcd | transmission line inverter

step motors | power synthesis | simulink fir | pisoiu | subsystem | impedance matching antenna | transistor sheet | sensor counter | pwm lcd | transmission line inverter