Documentation 
Convert model from discrete to continuous time
sysc = d2c(sysd)
sysc = d2c(sysd,method)
sysc = d2c(sysd,opts)
[sysc,G]
= d2c(sysd,method,opts)
sysc = d2c(sysd) produces a continuoustime model sysc that is equivalent to the discretetime dynamic system model sysd using zeroorder hold on the inputs.
sysc = d2c(sysd,method) uses the specified conversion method method.
sysc = d2c(sysd,opts) converts sysd using the option set opts, specified using the d2cOptions command.
[sysc,G] = d2c(sysd,method,opts) returns a matrix G that maps the states xd[k] of the statespace model sysd to the states xc(t) of sysc.
sysd 
Discretetime dynamic system model You cannot directly use an idgrey model with FcnType='d' with d2c. Convert the model into idss form first. 
method 
String specifying a discretetocontinuous time conversion method:
Default: 'zoh' 
opts 
Discretetocontinuous time conversion options, created using d2cOptions. 
sysc 
Continuoustime model of the same type as the input system sysd. When sysd is an identified (IDLTI) model, sysc:

G 
Matrix mapping the states xd[k] of the statespace model sysd to the states xc(t) of sysc: $${x}_{c}\left(k{T}_{s}\right)=G\left[\begin{array}{c}{x}_{d}\left[k\right]\\ u\left[k\right]\end{array}\right].$$ Given an initial condition x0 for sysd and an initial input u0 = u[0], the corresponding initial condition for sysc (assuming u[k] = 0 for k < 0 is given by: $${x}_{c}\left(0\right)=G\left[\begin{array}{c}{x}_{0}\\ {u}_{0}\end{array}\right].$$ 
Consider the following discretetime transfer function:
$$H\left(z\right)=\frac{z1}{{z}^{2}+z+0.3}$$
Suppose the model has sample time T_{s} = 0.1 s. You can derive a continuoustime zeroorderhold equivalent model with the following commands:
H = tf([1 1], [1 1 0.3], 0.1); Hc = d2c(H)
Hc = 121.7 s + 3.026e12  s^2 + 12.04 s + 776.7 Continuoustime transfer function.
Discretizing the resulting model Hc with the default zeroorder hold method and sampling time T_{s} = 0.1s returns the original discrete model H(z):
c2d(Hc,0.1)
ans = z  1  z^2 + z + 0.3 Sample time: 0.1 seconds Discretetime transfer function.
To use the Tustin approximation instead of zeroorder hold, type
Hc = d2c(H,'tustin');
As with zeroorder hold, the inverse discretization operation
c2d(Hc,0.1,'tustin');
gives back the original H(z).
Convert an identified transfer function and compare its performance against a directly estimated continuoustime model.
load iddata1 sys1d = tfest(z1,2,'Ts',0.1); sys1c = d2c(sys1d,'zoh'); sys2c = tfest(z1,2); compare(z1,sys1c,sys2c)
The two systems are virtually identical.
Analyze the effect of parameter uncertainty on frequency response across d2c operation on an identified model.
load iddata1 sysd = tfest(z1, 2, 'Ts', 0.1); sysc = d2c(sysd, 'zoh');
sys1c has no covariance information. Regenerate it using a zero iteration update with the same estimation command and estimation data:
opt = tfestOptions; opt.SearchOption.MaxIter = 0; sys1c = tfest(z1, sysc, opt); h = bodeplot(sysd, sysc); showConfidence(h)
The uncertainties of sysc and sysd are comparable up to the Nyquist frequency. However, sysc exhibits large uncertainty in the frequency range for which the estimation data does not provide any information.
If you do not have access to the estimation data, use translatecov which is a Gaussapproximation formula based translation of covariance across model type conversion operations.
The Tustin approximation is not defined for systems with poles at z = –1 and is illconditioned for systems with poles near z = –1.
The zeroorder hold method cannot handle systems with poles at z = 0. In addition, the 'zoh' conversion increases the model order for systems with negative real poles, [2]. The model order increases because the matrix logarithm maps real negative poles to complex poles. Single complex poles are not physically meaningful because of their complex time response.
Instead, to ensure that all complex poles of the continuous model come in conjugate pairs, d2c replaces negative real poles z = –α with a pair of complex conjugate poles near –α. The conversion then yields a continuous model with higher order. For example, to convert the discretetime transfer function
$$H\left(z\right)=\frac{z+0.2}{\left(z+0.5\right)\left({z}^{2}+z+0.4\right)}$$
type:
Ts = 0.1 % sample time 0.1 s H = zpk(0.2,0.5,1,Ts) * tf(1,[1 1 0.4],Ts) Hc = d2c(H)
These commands produce the following result.
Warning: System order was increased to handle real negative poles. Zero/pole/gain: 33.6556 (s6.273) (s^2 + 28.29s + 1041)  (s^2 + 9.163s + 637.3) (s^2 + 13.86s + 1035)
To convert Hc back to discrete time, type:
c2d(Hc,Ts)
yielding
Zero/pole/gain: (z+0.5) (z+0.2)  (z+0.5)^2 (z^2 + z + 0.4) Sampling time: 0.1
This discrete model coincides with H(z) after canceling the pole/zero pair at z = –0.5.
[1] Franklin, G.F., Powell,D.J., and Workman, M.L., Digital Control of Dynamic Systems (3rd Edition), Prentice Hall, 1997..
[2] Kollár, I., G.F. Franklin, and R. Pintelon, "On the Equivalence of zdomain and sdomain Models in System Identification," Proceedings of the IEEE^{®} Instrumentation and Measurement Technology Conference, Brussels, Belgium, June, 1996, Vol. 1, pp. 1419.
c2d  d2cOptions  d2d  logm  translatecov