My code is defined as follows:
U = sym('u', [101 1]);syms u P QP(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);endplot(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?
Best Answer