How to solve this error "Attempt to extract field 'NormalizePathGains from 'mxArray'?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Walter Roberson
am 10 Mai 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 Kommentar
Hs5555
am 28 Okt. 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?
Siehe auch
Kategorien
Mehr zu MATLAB Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!