Question: is it possible to use patmatch on both sides of equation?

Currently to parse initial conditions of ODE entered bu user in the form y(x0)=y0 in order to determine x0 and y0 I use patmatch on lhs and rhs separatly which is not a big deal. I wanted to see if I can use an equation inside patmatch.

I could not figure how to use patmatch on both sides of equation on one call.  Help says expression to patmatch is algebraic expression. Does this means an equation can't be used as whole? Here is an example to make it more clear

restart;
ic:=y(0) = 1;
patmatch(ic,y(x0::anything)=y0::anything,'la')

Which gives false. i.e. no match found.

Is there a trick to make the above work if possible? This is just a basic example. I might want to apply this on more complicated equation where more things are on lhs and rhs of =  but patmatch does not like `=` in the middle there. 

 

 

 

Please Wait...