function [Vs,Ws]=Intersect(Vdot,wdot) %% Carol Lucas %% Finds the intersection point(s) of two nullclines using symbolic language syms V w Vdot=subs(Vdot); wdot=subs(wdot); %% This solves for w in terms of V wsubs=solve(wdot,w); vsubs=solve(Vdot,w); %% Make Vdot a function of only V by substituting for w Vdote1=subs(Vdot,w,wsubs); %% Find all possible values of V Vs=eval(solve(Vdote1,'V')); %% Pick out the good ones - tailor to your needs - may be better to do %% in the calling program. % good=imag(Vs)==0; %% for example, we only want the real ones. % Vs=Vs(find(good)); %% Now find the Ws that go with those Vs Ws=subs(wsubs,V,Vs);