Determine if digital filter coefficients are single precision
flag = issingle(d)
designfilt to design a 6th-order highpass IIR filter. Specify a normalized passband frequency of rad/sample. Convert it to a single-precision filter. Identify the precision in each case.
fd = designfilt('highpassiir','FilterOrder',6,'PassbandFrequency',0.6); isd = issingle(fd)
isd = logical 0
fs = single(fd); iss = issingle(fs)
iss = logical 1
d— Digital filter
Digital filter, specified as a
digitalFilter object. Use
designfilt to generate
on frequency-response specifications. If you want a single-precision
single to the
d = designfilt('lowpassiir','FilterOrder',3,'HalfPowerFrequency',0.5) specifies
a third-order Butterworth filter with normalized
3-dB frequency 0.5π rad/sample.
flag— Type identification
Type identification, returned as a logical scalar.