# MATLAB tips and tricks: Part 1

MATLAB is the programming language of choice for many engineers, scientists, data analysts, and more. In this post we introduce some interesting MATLAB tips and tricks. They can be used to make writing code easier and shorter, also to write codes that run faster.

# Dual Loop Clock and Data Recovery

Dual-loop clock and data recovery (CDR) systems are widely used in today’s gigabit wireline communications. Figure 1 shows the architecture of a dual-loop CDR, consisting of a phase locked loop (PLL) and CDR. The PLL creates a quadrature clock at the data rate of the input data $D_{in}$, while the CDR tracks the data phase along each lane of the serial link. The data recovery loop is based on a phase detector (PD), a finite state machine (FSM), and a phase interpolator (PI). A bang-bang PD creates "up" and "down" signals based on the phase of the clock in respect to the input data.

# Gain Compression in RF Systems

In this post we explain what the gain compression means and why it is important in the design of RF systems. We also explain how to compute single-tone and two-tone 1 dB compression points.