Manish Kumar Saini

Manish Kumar Saini

796 Articles Published

Articles by Manish Kumar Saini

Page 12 of 80

How to reverse a string in MATLAB?

Manish Kumar Saini
Manish Kumar Saini
Updated on 09-Oct-2023 568 Views

MATLAB provides various built-in functions to reverse a string of text. In this tutorial, I am going to explain all the commonly used methods to reverse a string in MATLAB. Reverse a String Using "reverse" Function in MATLAB There is a built-in function "reverse" in MATLAB that we can use to reverse a string. Syntax reversed_string = reverse(string); The steps involved in reversing a string using the "reverse" function are given below − Step (1) − Create a string of text. Step (2) − Call the "reverse" function to reverse the string. Step (3) − Display the ...

Read More

How to reverse a number in MATLAB?

Manish Kumar Saini
Manish Kumar Saini
Updated on 09-Oct-2023 953 Views

In MATLAB, there are various methods and functions for reversing a given number. In this tutorial, I will explain all these methods one-by-one with the help of examples. Reverse a Number Using "fliplr" Function in MATLAB The "fliplr" is a built-in function in MATLAB that we can use to reverse a given number. Syntax reversed_num = fliplr(number); Here, the "number" must be a string. Here are the steps involved in reversing a given number using the "fliplr" function in MATLAB. Step (1) − Input the number. Step (2) − Convert the input number to a string. For ...

Read More

How to remove spaces in a string in MATLAB?

Manish Kumar Saini
Manish Kumar Saini
Updated on 09-Oct-2023 797 Views

MATLAB provides various methods and functions to remove spaces in a string. In this tutorial, we will cover the commonly used methods for removing extra spaces in a string. So, let’s start. Remove White Space in a String Using "isspace" Function In MATLAB, the "isspace" function is a built-in function that is used to determine and remove the ASCII white space present in a string. Syntax string_without_space = isspace('input_string'); Example Let us take an example in MATLAB programming to use this function to remove white spaces in a string. % MATLAB code to remove white space from ...

Read More

How to Import Data from a CSV File with Numeric Values and Texts into MATLAB Workspace?

Manish Kumar Saini
Manish Kumar Saini
Updated on 06-Oct-2023 654 Views

CSV or Comma Separated Values is a file format that can store numeric and text values. The most important characteristic of a CSV file is that it allows to exchange the data among a variety of sources. MATLAB is a powerful tool that provides a large number of built-in functions to perform various operations. It provides the following two functions that enable the users to import data with numeric and text values from a CSV file into the MATLAB workspace. readtable() importdata() In this tutorial, I will show you the process of importing data from a CSV file ...

Read More

How to remove decimal in MATLAB?

Manish Kumar Saini
Manish Kumar Saini
Updated on 06-Oct-2023 2K+ 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

How to Read Text File Backwards Using MATLAB?

Manish Kumar Saini
Manish Kumar Saini
Updated on 06-Oct-2023 359 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

How to Read an Image File in MATLAB?

Manish Kumar Saini
Manish Kumar Saini
Updated on 06-Oct-2023 402 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

How to Randomly Shuffle Columns in Matrix in MATLAB?

Manish Kumar Saini
Manish Kumar Saini
Updated on 06-Oct-2023 1K+ 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

How to Perform Random Pseudo Coloring in Grayscale Image Using MATLAB?

Manish Kumar Saini
Manish Kumar Saini
Updated on 06-Oct-2023 801 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

How to Perform Contrast Enhancement of Color Image in MATLAB?

Manish Kumar Saini
Manish Kumar Saini
Updated on 06-Oct-2023 657 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
Showing 111–120 of 796 articles
« Prev 1 10 11 12 13 14 80 Next »
Advertisements