How to fix the unrecognized error??

In the following code, runtime error of "Unrecognized function or variable 'cbar'." is popping up. The code is trying to plot the mean of normal customer in interjecting queuing system. Kindly look into it.
Thanks and Regards
Arsh Tyagi
m = 40;
a = 2.0;
th = 0.2;
x = 0.5:0.001:1.5;
for n=1:m-1
for k=2:n+1
for l=k:n
for i=k-1:l-1
for j=1:i
d1 *= exp(-1/j);
end
a1 *= (1-d1);
end
b1 += (((x./a).*th).^(l-k+1)).*a1;
end
cbar += b1;
end
x2 += ((x/a).^n)*cbar;
end
for k=2:m
for l=k:m
for i=k-1:l-1
for j=1:i
d1 *= exp(-1/j);
end
a1 *= (1-d1);
end
b1 += (((x./a).*th).^(l-k+1)).*a1;
end
x3 += b1;
end
y2 = y1+x2+((1-x/a).*(((x/a).^m)./(a.*(1-(x/a).^(m+1))).*x3));
plot(x,y2);

댓글 수: 2

You code looks like a C code......Note that there is no possibility to use:
a1 .* =
cbar .+ =
You need to copy and paste your code here so that people can help you here. By adding code as image snippet, one cannot run the code to help you.
cbar += b1;
MATLAB would treat that as
cbar('+=', 'b1')
MATLAB does not have any of the op= operators such as += or &=

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Graphics Performance에 대해 자세히 알아보기

질문:

2020년 10월 22일

댓글:

2020년 10월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by