Error Conversion to double from sym is not possible
이전 댓글 표시
My code is defined as follows:
U = sym('u', [101 1]);
syms u P Q
P(1,1) = 1;
Q(1,1) = 0;
for k = 1:100
P(k+1,1) = .05*(-.3*P(k,1) +.65*Q(k,1)+U(k,1))+P(k,1);
Q(k+1,1) = .05*(-.65*Q(k,1) + .3*P(k,1)-U(k,1))+Q(k,1);
end
plot(P,U)
I know that the subs() function may be a solution to the conversion for symbolic functions so I also tried a "plot(P, double(subs(U,P)))" command instead, but this also pops up as an error. Does anyone know of another way for me to possibly plot this symbolic matrix?
채택된 답변
추가 답변 (1개)
Azzi Abdelmalek
2013년 12월 16일
0 개 추천
What are values affected to U?
댓글 수: 2
Azzi Abdelmalek
2013년 12월 16일
Mary commented
U is a control input on the probability P, so it ranges from 0 to 1.
Azzi Abdelmalek
2013년 12월 16일
How will you plot (P,U) if you don't assign values to U?
카테고리
도움말 센터 및 File Exchange에서 Common Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!