MATLAB: Symbols vs Floating points

doublefloating pointMATLABsym

This question has to do with the question in this link which Jan has kindly shed some light on.
As mentioned in my comment, I am wondering why my x0 is of class 'sym'. I tried playing around with it and discovered that the problem lies with c0=f(a0,b0).
But I don't know what I can do with it to make it a 'double'. The thing is c0 is a number, no?

Best Answer

  • Your f contains the term "sym('a')". Therefore the results get the type sym also. Perhaps you want to use the command double to make the symbolic expression numerically.