Just a simple math problem

조회 수: 2 (최근 30일)
Villanova
Villanova 2011년 12월 4일
Hi. I want to solve a equation in matlab, and wrote the attached file. but it has an error! Thank you.
% marcov chain
format long
syms s
syms l c sigma u
p2=(u*p1+1)/(s+l+sigma);
p1=((cl+sigma)*p2+2*u*p3)/(s+u+l);
p3=((1-c)*l*p2 + l*p1)/(s+2*u);
Availability=p1+p2;
% safety=p2+p1;
f=ilaplace(availability);
u=0.01;
l=0.0001;
c=0.95;
sigma=0.000001;
for i=1:100
time(i)=i*500;
t=time(i);
result(i)= double(subs(f));
end
plot (time,result)

채택된 답변

bym
bym 2011년 12월 4일
you define Availability (capital A), but then use availability (small a)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Markov Chain Models에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by