In page 35 of the text book the author ask readers to open the M-file "expm_ncs" in the NCS Library and follow its steps to form the matrix exponential but this code is not available. Did I misunderstand the sentence? If not, where can I find the code "expm_ncs"? Thanks.
Be careful ! The varactor is badly modelling.
The transient don't fit with the behaviour of a varactor. To check the problem, please try to charge the cap through a resistor and calculate the energie provided by the source. You don't obtain E=CxV2 (true relationship with varactor). Something wrong.
Now, try to put the integrator block outside the feedback. It works, but limited by the solver (if the order of function is greater than 1).