# Matlab

## How to plot a piecewise function in Matlab

This tutorial is about how to plot a piecewise function in MATLAB. In this tutorial, we will learn what a piecewise function is and the different ways to plot such functions in MATLAB. We will also see some examples for better understanding. We can implement piecewise functions by: Treating each function separately and merge and …

## How To Use Fzero In Matlab

This tutorial is about how to use fzero in Matlab. Before moving towards the ‘fzero’ command, let’s first understand what functions are, types of functions and why do we need ‘fzero’ command. The function is basically an expression that defines the relationship between the dependent and independent variables. It maps a set of inputs to …

## How to use Randi Matlab operator and Rand function

In this tutorial, we will learn how to use Rand and Randi Matlab Operator. But before moving towards these commands, lets first have an idea about random function generator. As the name implies, random function generator is a function or an algorithm which creates a sequence of random numbers. They have numerous applications such as …

## How to take Matlab Transpose – Syntax and Examples

This tutorial is about the Matlab Transpose operator. Let’s first understand the term ‘transpose’. The transpose of a matrix is an operator which switches rows with columns and vice versa. It can be also applied to a row vector or a column vector. Using the transpose operator, we can convert a row vector into a …

## How to use linspace in Matlab

The linspace function allows the programmer to produce an array, matrix, or vector of numbers that are linearly spaced. Suppose you want to create an array A of size 8 with values of 1, 2, 3, 4, 5, 6, and 7. This can be done by using following command “A= {0; 1; 2; 3; 4; …