Has anyone modelled calcium oscillations using Matlab software?
I wish to share an open-source modelling study on Ca2+ oscillations in astrocytes which contains a detailed description of the underlying math and even better, it has supplementary Matlab code published alongside (Zeng et al., 2009). This may be of help to check your formulae and script.

Unfortunately I do not feel inclined to start troubleshooting and bug-fixing your formulae and Matlab code, because, as mentioned in the comments, the issue can be anywhere in the chain of events.

Reference
Zeng et al., Biophys J (2009); 97(9): 2429–37