yudav
07/02/2007, 02:03
merhaba,
sorun digital sinyalle bilgi aktarimi ve kullandigimiz dil C.
.c, .h ve .mex.c de yazilan programlarla matlabda devam ediliyor.
asagida ekledigim formül zero crossing detection yani bir frekans üzerinde belirli noktalari
discrete olarak elde etmek.
benim sorunum ve sorum siyah karalanmis bölgedeki tk_m - to degerini siyah boyanmamis sag tarafdaki mTsymbol-tk ile beraber yazmak, yani toplam degerlerini cikarmak programda..
k=0dan baslayip Nt ye kadar gidiyor bu toplam fonksiyonunu siyah tarafda olan tk icin yazacagim.
bunu nasil yapacagimi bilmiyorum, bana yardimci olursaniz cok sevinirim.
formülün altina kendi yazdigim birseyi ekledim ama sadece siyah taraf icin düsünülmüs bir
kabataslak..
umarim yapmak istedigimi size anlatabilmisimdir..
acil cevap verebilirseniz cok sevinirim..iyi calismalar..
http://de.f267.mail.yahoo.com/ym/de/ShowLetter?box=Sent&MsgId=5239_6098482_130606_641_47368_0_1918_73079_2 165052931&bodyPart=2&YY=93079&y5beta=yes&y5beta=yes&order=down&sort=date&pos=0&view=a&head=b&Idx=0
//#define _DEBUG_
#include "debug.h"
#pragma DEPENDS_ON debug.h
// Begin of description of myComplex.c #########################################
// Version:
// Description: see myComplex.h
// End of description of myComplex.c ###########################################
/* ****************************************** */
/* myComplex.h */
/* complex number definition */
struct myComplex {
double real;
double imaginary;
};
/* ****************************************** */
/* ****************************************** */
/* myComplex.c */
/* main program */
#include
#pragma DEPENDS_ON myComplex.h
int main(void) {
/* initializations */
/* wvh ==> Write Value Here */
int a0 = wvh;
double f_IF = wvh;
double *deltaTkm = wvh;
int *t0 = wvh;
int phi0 = wvh;
r = a0 / (3.14 * f_IF * deltaTkm);
myComplex z; /* stores the results */
double theta;
for(tkm = 0; tkm <= 255; tkm = tkm+1) {
/* since z = r * exp(i*theta) = r * (cosinus(theta) + i * sinus(theta)) */
theta = (3.14/2) - 2 * 3.14 * f_IF * (tkm-t0) + phi0;
z.real[tkm] = r * cos(theta);
z.imaginary[tkm] = r * sin(theta);
}
/* now the required values are stored at "z" variable */
/* if you want, you can record the contents to a file by using "fprintf"
command */
return 0;
}
/* ****************************************** */
sorun digital sinyalle bilgi aktarimi ve kullandigimiz dil C.
.c, .h ve .mex.c de yazilan programlarla matlabda devam ediliyor.
asagida ekledigim formül zero crossing detection yani bir frekans üzerinde belirli noktalari
discrete olarak elde etmek.
benim sorunum ve sorum siyah karalanmis bölgedeki tk_m - to degerini siyah boyanmamis sag tarafdaki mTsymbol-tk ile beraber yazmak, yani toplam degerlerini cikarmak programda..
k=0dan baslayip Nt ye kadar gidiyor bu toplam fonksiyonunu siyah tarafda olan tk icin yazacagim.
bunu nasil yapacagimi bilmiyorum, bana yardimci olursaniz cok sevinirim.
formülün altina kendi yazdigim birseyi ekledim ama sadece siyah taraf icin düsünülmüs bir
kabataslak..
umarim yapmak istedigimi size anlatabilmisimdir..
acil cevap verebilirseniz cok sevinirim..iyi calismalar..
http://de.f267.mail.yahoo.com/ym/de/ShowLetter?box=Sent&MsgId=5239_6098482_130606_641_47368_0_1918_73079_2 165052931&bodyPart=2&YY=93079&y5beta=yes&y5beta=yes&order=down&sort=date&pos=0&view=a&head=b&Idx=0
//#define _DEBUG_
#include "debug.h"
#pragma DEPENDS_ON debug.h
// Begin of description of myComplex.c #########################################
// Version:
// Description: see myComplex.h
// End of description of myComplex.c ###########################################
/* ****************************************** */
/* myComplex.h */
/* complex number definition */
struct myComplex {
double real;
double imaginary;
};
/* ****************************************** */
/* ****************************************** */
/* myComplex.c */
/* main program */
#include
#pragma DEPENDS_ON myComplex.h
int main(void) {
/* initializations */
/* wvh ==> Write Value Here */
int a0 = wvh;
double f_IF = wvh;
double *deltaTkm = wvh;
int *t0 = wvh;
int phi0 = wvh;
r = a0 / (3.14 * f_IF * deltaTkm);
myComplex z; /* stores the results */
double theta;
for(tkm = 0; tkm <= 255; tkm = tkm+1) {
/* since z = r * exp(i*theta) = r * (cosinus(theta) + i * sinus(theta)) */
theta = (3.14/2) - 2 * 3.14 * f_IF * (tkm-t0) + phi0;
z.real[tkm] = r * cos(theta);
z.imaginary[tkm] = r * sin(theta);
}
/* now the required values are stored at "z" variable */
/* if you want, you can record the contents to a file by using "fprintf"
command */
return 0;
}
/* ****************************************** */