How to convert matlab code to C code?

Hi, i used Matlab for preprocessing EEG signal and i extracted some features fromm it by calculating maximum and minimum amplitude,mean and standard deviation . Also i apply for the EEG signal wavelet transform and i extarcted the energy for the details and approximations coefficient.and now i want to convert the matlab code to c code but i dont know how so can anyone please help me how to do this or give me hint ? Thanks

 採用された回答

James Tursa
James Tursa 2017 年 7 月 14 日

0 投票

See this link about the MATLAB Coder:
https://www.mathworks.com/help/coder/index.html

2 件のコメント

afef
afef 2017 年 7 月 15 日
Ok Thanks for the reply
afef
afef 2017 年 7 月 15 日
I tried the matlab coder but i failed because when it comes to check issues i got errors like this : wavedec is not supported for code generation detcoef is not supported for code generation
this is my matlab code
Fs=256;
result=cell(23,1);
for n=1:23
deriv=(val(n,:))/2.559375;
t=(0:length(deriv)-1)/Fs;
result{n} = filtfilt(d1,deriv);
moyenne{n}=mean(result{n},2);
variance{n} = std(result{n},[], 2);
Maximale{n}= max(result{n},[],2);
Minimale{n} = min(result{n},[],2);
[c,l]=wavedec(result{n},4,'db4');
[cd1,cd2,cd3,cd4]=detcoef(c,l,[1,2,3,4]);
cA4=appcoef(c,l,'db4',4);
[Ea,Ed]=wenergy(c,l)
energie{n} = {Ea, Ed};
end
[a,b,z,d,e,f,g,h,i,j,k,ll,m,n,o,p,q,r,s,x,u,v,w]=result{:};
What should i do please?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEEG/MEG/ECoG についてさらに検索

質問済み:

2017 年 7 月 14 日

コメント済み:

2017 年 7 月 15 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by