Help with recursion limit!
Show older comments
Help! When I run my code on my laptop it runs without error, but when I run it from an old computer it throws me the error:
Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N) to change the limit. Be aware that exceeding your available stack space can crash MATLAB and/or your computer. Error in coder.allowpcode
and I need to run my code from the old computer. I set also the recursion limit to a bigger value, but my matlab program crash, and I just try until de maximum value in order that matlab do not crash ans also gives me that error. Can somebody help me, I don't understand why is this.
My code is:
function hLMChan= nume(Ts,Fd,pathDelays,avgPathGains)
hLMChan = rayleighchan(Ts,Fd,pathDelays,avgPathGains); hLMChan.StoreHistory=1;
M = 2; % Modulation order
hMod = comm.BPSKModulator(0);
Rsym = 1200; % Input symbol rate
Rbit = Rsym * log2(M); % Input bit rate
Nos = 2; % Oversampling factor
Ts = (1/Rbit) / Nos; % Input sample period
Fd = 1; % Chosen maximum Doppler shift for simulation
pathDelays = [0 0.002];
avgPathGains = [0 0]; N = 10000;
Nsamples = 100; %number of samples per frame
dop = doppler.gaussian;
hLMChan.DopplerSpectrum = dop;
plot(hLMChan);
for frames = 1:N
inputSig = step(hMod, randi([0 M-1], Nsamples, 1)); % Apply the channel effects % Channel filter %run signal through channel
end
end
6 Comments
Jan
on 18 May 2015
Please post the complete error message. Which function causes the recursion? Currently we see only the function "nume", but the code does not contain a recursive call.
Muresan Aronia
on 3 Jun 2015
We would be happy to help you, but you need to give us the exact information that we ask for: instead you just gave us another copy of the code that you already gave in your question.
Please give the complete and whole error message, and explain/show where this recursive call is happening.
Walter Roberson
on 4 Jun 2015
Stephen the original problem was solved somehow and the new question is wildly different
Muresan Aronia
on 5 Jun 2015
Answers (0)
Categories
Find more on Surrogate Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!