Help with recursion limit!

2 views (last 30 days)
Muresan Aronia
Muresan Aronia on 18 May 2015
Commented: Muresan Aronia on 5 Jun 2015
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
Walter Roberson
Walter Roberson on 4 Jun 2015
Stephen the original problem was solved somehow and the new question is wildly different
Muresan Aronia
Muresan Aronia on 5 Jun 2015
Thanks a lot for your interest in helping me, now,I think I solved also the second problem. When I run the code it functions,the graph(power spectrum) appears,but the simulation time is very long,the simulation never ends unless I stop it. Does anybody knows how could i decrease the simulation time.I repeat,i'm working in AWR-VSS program and i'm using the matlab block.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!