سلام
کسی راهی بلده برای اینکه یه برنامه 200 خطی Matlab رو بشه به C# تبدیل کرد.
الان دارم به زحمت این کار رو میکنم. فقط این تیکه کد رو ببینید
function samps = samplesinfile(fid)
fseek(fid,14,'bof');
% Read number-of-records and compression-code of every block into an array
nr = fread(fid,'uint16',1022);
% Separate number-of-records and compression-code from the 16 bit value read
cc = bitshift(nr,-8);
nr = bitand(nr,255);
% sum up the number of samples in each block
samps=sum(cc.*nr);
frewind(fid);
کسی میدونه معادل این کد تو C# چی میشه؟
اون fid که داده یه متغیره که حاصل از fread هست.
متشکرم