Remove Decimal in MATLAB

Manish Kumar Saini
Updated on 06-Oct-2023 11:25:40

1K+ Views

In mathematics, there are several types of numeric values such as integers (having no fractional part), floating point numbers (having fractional parts separated by a decimal), and more. In some data analysis and other computational applications, we are given floating point numbers that contain a decimal part, i.e., digits after a decimal point. But we require only integers. Hence, if you are using MATLAB as your data processing tool, then you can use it to remove decimals present in the given number. This tutorial is primarily meant for explaining the different methods of removing decimals from a given number using ... Read More

Read Text File Backwards Using MATLAB

Manish Kumar Saini
Updated on 06-Oct-2023 11:22:44

280 Views

In MATLAB, reading a text file backwards involves reversing the order of the lines written in the file. We can use MATLAB to reverse the order and read the text file backwards. For this, MATLAB provides various methods using different functions and algorithms. In this tutorial, I will explain the commonly used methods to read a text file backward using MATLAB. Create a Text File in MATLAB In MATLAB, we can create a text file using the built-in functions "fopen" and "fprintf". Example The following example demonstrates the process of creating a text in MATLAB. % MATLAB code to ... Read More

Read an Image File in MATLAB

Manish Kumar Saini
Updated on 06-Oct-2023 11:20:48

315 Views

Reading an image file is the first step in any digital image processing task. In MATLAB, reading an image file means the process of inputting or loading the digital image into the MATLAB workspace and store it in a variable. Let us now understand the process of reading an image file in MATLAB with the help of examples. Read an Image File in MATLAB In MATLAB, there is a built-in function named "imread" in the function library that is used to read an image file. Syntax img = imread(imageFilePath); Here, "img" is a variable to store the input ... Read More

Randomly Shuffle Columns in Matrix in MATLAB

Manish Kumar Saini
Updated on 06-Oct-2023 11:19:44

986 Views

MATLAB is an efficient tool to process and manipulate matrices. We can use it to shuffle the columns in a matrix. For this, MATLAB provides built-in functions that can be used together to shuffle the columns in a matrix. In this tutorial, I will explain how you can randomly shuffle columns in a matrix using MATLAB. How to Random Shuffle Columns of Matrix Using MATLAB? MATLAB provides some built-in functions that we can use to shuffle the columns in a matrix. We have to follow the steps given below to shuffle the columns in a matrix using MATLAB. Step ... Read More

Perform Random Pseudo Coloring in Grayscale Image using MATLAB

Manish Kumar Saini
Updated on 06-Oct-2023 11:14:00

694 Views

In digital image processing, random pseudo coloring is a technique in which pixels of a grayscale image are assigned a random color. In this tutorial, I am going to explain the process of performing random pseudo coloring in a grayscale image using MATLAB. What is Random Pseudo Coloring in Grayscale Image? In digital image processing, "random pseudo coloring" is a way of converting a gray scale image to a random colored image. In this technique, the intensity value of each pixel of the gray scale image is assigned a random color value. Random pseudo coloring in grayscale image is widely ... Read More

Perform Contrast Enhancement Using Histogram Equalization in MATLAB

Manish Kumar Saini
Updated on 06-Oct-2023 11:12:21

256 Views

In digital image processing, the process of improving visual quality and clarity of a digital image by changing the color intensities is referred to as "contrast enhancement". Contrast enhancement is an important image processing task in various fields such as photography, remote imaging, medical imaging, etc. We can use various tools to perform contrast enhancement of an image. In this tutorial, I will explain the process of performing contrast enhancement using histogram equalization in MATLAB. What is Contrast Enhancement? In digital image processing, contrast enhancement is a basic image processing task performed to improve visual quality of an image to ... Read More

Perform Contrast Enhancement of Color Image in MATLAB

Manish Kumar Saini
Updated on 06-Oct-2023 11:11:08

505 Views

As we know, MATLAB is a powerful to perform image processing and signal processing. We can use it to alter different parameters of an image like brightness, contrast, saturation, and more. In this article, I will explain how we can perform contrast enhancement of a color image using MATLAB. What is a Contrast Enhancement? In digital image processing, the process of improving the colors and visual quality of an image is called contrast enhancement. This technique improves the quality of an image by changing the brightness and color concentration among different regions of the image. Contrast enhancement is used ... Read More

Normalize a Histogram in MATLAB

Manish Kumar Saini
Updated on 06-Oct-2023 11:09:02

668 Views

A histogram is nothing but a graphical representation that shows the distribution of a set of data points. The normalization of a histogram is a process of distributing its frequencies over a wide range. Before discussing the implementation of histogram normalization in MATLAB, let us first get an overview of histogram normalization. What is Histogram Normalization? A histogram is a graphical way of representing the distribution of frequencies of a dataset. Sometimes, we see a histogram in which the frequencies are distributed in a small range. It results in producing poor contrast in a digital image. There is a ... Read More

Iterate Through Each Element in N-Dimensional Matrix in MATLAB

Manish Kumar Saini
Updated on 06-Oct-2023 11:06:46

1K+ Views

MATLAB is a powerful tool to perform various operations on matrices. In the case of matrices, iterating through elements of a matrix is one of the common operations used to perform various other matrix operations such as finding sum of all elements of a matrix, finding maximum and minimum values in a matrix, and more. In this article, I will explain how to iterate through elements in an N-dimensional matrix in MATLAB. Iterating Through Elements of a Matrix In a matrix, iterating through each element means visiting and processing every value present within the matrix. An N-dimensional matrix is one ... Read More

Inverse a Vector in MATLAB

Manish Kumar Saini
Updated on 06-Oct-2023 11:04:09

372 Views

As we know, MATLAB is a powerful tool to perform various operations on matrices and arrays. Vector is a type of matrix having only one row or one column. We can determine the inverted version of a vector using MATLAB. For this, MATLAB provides different methods and functions. So, let’s discuss the process of inverting a vector using different methods in MATLAB. Inverse a Vector Using Indexing Method in MATLAB In MATLAB, we can utilize the indexing method to find inverse of a given vector. In this method, the elements of the vector are arranged in the reverse order using ... Read More

Advertisements