I have a GUI based program thats calling several built
in as well as self made functions. its also acquiring
video at the same time. How can i convert this program
of mine into an executable so that i dont have to run
it from matlab each time?
Hope someone replies soon!
Thanks
E.S
Reply by Jeff Brower●April 17, 20072007-04-17
Denilson-
> In the time domain i want to see 4 different sinewave
plots for the 4
> different frequencies. But one plot with the FFT of the 4 frequencies.
> The problem is that it's having different FFT amplitudes. Thanx
It's still not clear to me what's your objective. There's lots
of reasons why freq
domain magnitude amplitudes may not be identical, some valid some not. So you
have
explain why you're worried about it, which means explaining your
objective.
I suggest that you try adding the sine waves together in time domain, then take
FFT
of this combined waveform and plot using Fs = 1800 MHz. Then try the same
experiment
with Fs = 2048 MHz, and frequencies 128 MHz, 256 MHz, 768 MHz, and 1024 MHz.
Then
you can start to get some idea of how amplitude varies with different
frequencies and
sampling rates.
-Jeff > --- In m..., "Jeff Brower" wrote:
>
> > Before worrying about exact amplitude levels, it might help to
> clarify your objective. If your frequencies are 100,
> > 300, 700, and 900 MHz, and your sampling rate is 1800 MHz, then you
> want to combine the sinewaves in the time domain
> > and see one magnitude plot from 0 to 900 MHz? Or you want 4
> separate magnitude plots, each with sample rate = 2f, or
> > each with sample rate 1800 MHz?
> >
> > Please clarify.
> >
> > -Jeff
> >
> > > And i'm not sure if the x-axe for frequencies is correct.
> > > Please, someone give me a help here.
> > >
> > > %frequencies
> > > f10e6; f200e6; f3p0e6; f40e6;
> > > fase=0;
> > >
> > > NP;
> > >
> > > %Sample Frequency
> > > f=lcm(lcm(f1,f2),lcm(f3,f4));
> > > Fs=2*f;
> > >
> > > w1=2*pi*f1; w2=2*pi*f2; w3=2*pi*f3; w4=2*pi*f4;
> > >
> > > Am=1;
> > >
> > > t=-N*(1/Fs):1/Fs:N*(1/Fs);
> > > L=length(t);
> > >
> > > %Signals
> > > s1=Am*sin(w1*t + fase); s2=Am*sin(w2*t + fase); s3=Am*sin(w3*t +
> > > fase); s4=Am*sin(w4*t + fase);
> > >
> > > %FFT
> > > F1t(s1)/N/2; F2t(s2)/N/2; F3t(s3)/N/2; F4t(s4)/N/2;
> > >
> > > figure
> > > %PLOTs of the sins
> > > subplot(221), plot(t,s1); grid on
> > > title('s1'),xlabel('Tempo');
ylabel('Amplitude');
> > > subplot(222), plot(t,s2); grid on
> > > title('s2'),xlabel('Tempo');
ylabel('Amplitude');
> > > subplot(223), plot(t,s3); grid on
> > > title('s3'),xlabel('Tempo');
ylabel('Amplitude');
> > > subplot(224), plot(t,s4); grid on
> > > title('s4'),xlabel('Tempo');
ylabel('Amplitude');
> > >
> > > p=(0:L-1)*Fs/L;
> > >
> > > figure
> > > %PLOTs of the FFTs
> > > plot(p, abs(F1), 'b', p, abs(F2), 'm', p, abs(F3),
'c', p, abs
> > > (F4), 'r');
> > > xlabel('Frequcia (Hz) ')
> > > ylabel('Amplitude')
> > > grid on;
> > >
> > >
> > > figure
> > > %STEMs dos FFTs
> > > subplot(221), stem(p,abs(F1)); grid on
> > > title('100 MHz'),xlabel('Frequcia (Hz)');
ylabel('Amplitude');
> > > subplot(222), stem(p,abs(F2)); grid on
> > > title('300 MHz'),xlabel('Frequcia (Hz)');
ylabel('Amplitude');
> > > subplot(223), stem(p,abs(F3)); grid on
> > > title('700 MHz'),xlabel('Frequcia (Hz)');
ylabel('Amplitude');
> > > subplot(224), stem(p,abs(F4)); grid on
> > > title('900 MHz'),xlabel('Frequcia (Hz)');
ylabel('Amplitude');
> >