I am trying to solve a set of Laplace equations and get three functions. My code is as
syms l lr lc mu ssyms p2(s,l,lr,lc,mu) p1(s,l,lr,lc,mu) p0(s,l,lr,lc,mu)eqn0=s*p0==lr*p1+lc*p2;eqn1=s*p1==2*l*p2-lr*p1-mu*p1;eqn2=s*p2-1==mu*p1-2*l*p2-lc*p2;eqn=[eqn0,eqn1,eqn2];[p0sol, p1sol, p2sol]=solve(eqn, [p0, p1, p2])
I am trying to find the functions p0, p1 and p2.
This produces and error saying "The second argument must be a vector of symbolic variables". I found a bunch of threads about this error but could not relate to this formulation.
How do I get what these functions are?
Best Answer