How to solve this error "Attempt to extract field 'NormalizePathGains from 'mxArray'?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
How to solve this error "Attempt to extract field 'NormalizePathGains' from 'mxArray'? Here is the code
ChanRD = zeros(K,block_size*Q);
coder.extrinsic('rayleighchan');
for j = 1:K
CHANN = rayleighchan(T_s,F_D);
CHANN.NormalizePathGains = 1;
CHANN.ResetBeforeFiltering = 1;
x = ones(1,Mc_Ber*Q*block_size);% known transmitted signal
ChanRD(j,:) = filter(CHANN,x);
0 comentarios
Respuestas (1)
Walter Roberson
el 10 de Mayo de 2016
Before the loop, assign to CHANN a structure array with the proper fields and the maximum size that rayleighchan will allocate. Then the CHANN = rayleighchan(T_s,F_D) assignment will result in the data being pulled out of the mxArray into memory accessible to the function.
1 comentario
Hs5555
el 28 de Oct. de 2018
hi walter, I've encountered the same problem in the following code:
fitresult = fit(x,y, fit_1); % fit is a function of curve fitting toolbox
slope = fitresult.a;
how do I assign the variable 'fitresult' a structure with the proper fields and the maximum size and how can i find out how much memory to allocate?
Ver también
Categorías
Más información sobre MATLAB Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!