欢迎分享,转载请注明来源:内存溢出
Matlab2008 以后的版本自带粗拿的段凳羡就有,只需要自己设定生成矩阵即可。自己看一下握拍帮助, Example H = dvbs2ldpc(3/5)spy(H)% Visualize the location of nonzero elements in H. henc = fec.ldpcenc(H)hdec = fec.ldpcdec(H)#include <iostream> #include <limits> #define LNODE 20 using namespace std #include <malloc.h> #include <坦含conio.h> typedef char **HuffmanCode HuffmanCode HuffmanCoding(int n) { int i , f , start , j , count = 1 char *cd HuffmanCode HC HC = (HuffmanCode)malloc((n+1)* sizeof(char *)) cd = (char *)malloc(n*sizeof(char)) cd[n-1] = '让亮笑\0' for(i = 1 i <= n i++) { start = n - 1 for(j = 1 j <= count j++){ cd[--start] = '9' } HC[i] = (char *)malloc((n-start)*sizeof( char)) strcpy(HC[i],&cd[start]) count++ } free(cd) return(HC) }//HuffmanCoding int main() { int k int A[LNODE] HuffmanCode q q = HuffmanCoding(LNODE) for(k = 1 k <= LNODE k++) cout <<*q[k] <<" "键漏 cout <<"OK" getch() return 0 }
赞
(0)
打赏
微信扫一扫
支付宝扫一扫
求LED控制软件,已上图
上一篇
2023-04-14
Python字典题求助
下一篇
2023-04-14
评论列表(0条)