Home > Back-end >  Urgent urgent!!!!! Put a great god MATLAB into a C program
Urgent urgent!!!!! Put a great god MATLAB into a C program

Time:09-30

You do not to come out, my!!!!!! Pray god help

Put the following MATLAB rewritten into a C program, because C forget about, mainly to the following the plural four-dimensional matrix don't know how to allocate space in C,


For tt 00%=1:10 1000 simulation time
Four transmitting antenna for % s=1:4
Htmp (:, s,,, :)=Htmp (:, s,,, :). * cum_prod_factor_NLoS_e {2} (:, s,,, :);
H (:, s,,, tt)=sum (Htmp (:, s,,, :), 4);
end;
Htmp=Htmp. * cum_prod_factor_NLoS_e {2};
H (:, :, :, tt)=sum (Htmp (:, :, :, :), 4);
end;

Htmp and cum_prod_factor_NLoS_e {2} are known 2 * 4 * 8 * 20 four-dimensional matrix, each matrix element is complex; H is 2 * 4 * 8 * 1000 the four-dimensional matrix zero,

Appreciate!!!!!!

CodePudding user response:

Dynamic allocation.
  • Related