필터 지우기
필터 지우기

How do I get rid of this error on MATLAB?

조회 수: 1 (최근 30일)
Z
Z 2013년 6월 14일
My error:
>>daq.getDevices
Maximum recursion limit of 1 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 daq.getDevices
My computer is connected to a National Instrument Device and I want it to be detected. After putting in the following code in the scripting section, I kept getting an error even though I deleted it!
Here is the code.. I am trying to make a function with inputs and outputs:
function [m,s] = stat(x)
n = length(x);
m = sum(x)/n;
s = sqrt(sum((x-m).^2/n));
values = [12.7, 45.4, 98.9, 26.6, 53.1];
[ave,stdev] = stat(values)

채택된 답변

Image Analyst
Image Analyst 2013년 6월 14일
If your "stat" function calls "stat" inside it, then it's recursive. And since you don't have any ending condition, it will just keeping going in deeper and deeper until you recurse deeper than it can handle.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by