Found 214 Articles for Data Analysis

Generating Random Number in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 16:39:28

524 Views

In MATLAB programming, we can use various types of built-in functions to generate different types of random numbers. Random numbers are nothing but numbers selected randomly from a set of numbers. MATLAB provides the following four major functions to generate different types of random numbers depending on our requirements: rand() randn() randi() randperm() Let us discuss each of these four ... Read More

Floating Point Precision in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 11:38:52

181 Views

In MATLAB, the numeric class consists of various data types, such as signed integers, unsigned integers, single-precision floating point number, and double-precision floating point numbers. In MATLAB, the floating point precision basically defines the number of significant digits that can be specified and manipulated by performing a floating point arithmetic operation. The IEEE 754 standard determines the default floating point precision in MATLAB. As per this standard, the floating point numbers are represented in the following two formats: Single-Precision Floating Point Number Double-Precision ... Read More

Create Array of Zeros in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 11:33:49

163 Views

In MATLAB, the variables are typically stored in the form of a matrix or array. Sometimes, we require a matrix or array of zeros to perform a specific operation. Therefore, MATLAB allows us to create a matrix or array of zeros. For this task, we can use MATLAB's built-in functions or manual methods. In this article, we will learn different methods to create a matrix or array of zero with the help of example programs in MATLAB programming. Array of Zeros using `zeros()` Function in MATLAB MATLAB provides a built-in function named `zeros()` to create a matrix ... Read More

Checkbox in MATLAB App Building

Manish Kumar Saini
Updated on 18-Jul-2023 11:20:13

146 Views

MATLAB provides an integrated app building toolbox that we can use to create a graphical user interface based app without writing any kind of code. Hence, MATLAB allows users to create professional applications by just drag and drop facility. After that the user can write a MATLAB code to define the behavior of the app options. As mentioned above, this article is primarily meant for creating a user interface in the application which provides a list of options from which a user can select any number of choices. This user interface is referred to as checkbox. A checkbox ... Read More

Combine two images in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 11:07:43

357 Views

MATLAB allows us to combine two images through various methods like image fusion, image join, image concatenate, image overlay, image blending, etc. In this tutorial, we will explore all these techniques of combining two images. Combine Two Image in MATLAB using `imtile()` Function In MATLAB, we can combine two images by using the `imtile()` function. This function allows us to arrange our multiple images in a tiled layout. Syntax To combine two images, the `imtile` function takes the following syntax: img = imtile({img1, img2}, 'GridSize', [1, 2]); Now, let us see the implementation of the ... Read More

Change Background of Color Image into Grayscale in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 11:23:24

63 Views

We can obtain grayscale color by setting RGB values to 128. This means all color channels will have the same intensity values. The following MATLAB program illustrate the code for changing the background of a color image into grayscale. Example %MATLAB program to demonstrate changing color background into grayscale % Read the input colored image img1 = imread('https://www.tutorialspoint.com/assets/questions/media/14304-1687425236.jpg'); % Display the input color image subplot(1, 2, 1); imshow(img1); title('Original Image'); % Create a binary mask of the background BGMask = img1(:, :, 1) == img1(1, 1, 1) & ... ... Read More

Calculate Complex Conjugate Transpose in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 10:58:11

160 Views

The Complex Conjugate Transpose is a mathematical operation performed on a matrix of complex numbers. It is also known as Hermitian Transpose of Matrix. In this operation, first the transpose of the matrix is taken and after that the conjugate of each element of the matrix. For example, if a there is a complex matrix M, then the complex conjugate transpose of this matrix will be M* that is obtained by taking transpose of M and then replacing each element with its complex conjugate. The complex conjugate of a complex number is simply determined by changing the sign of ... Read More

Balance Contrast Enhancement Technique in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 11:00:20

101 Views

In digital image processing, the contrast enhancement is a crucial technique used to improve visual quality of an image. The contrast enhancement technique adjusts the intensities of pixels to increase the range of brightness levels and highlights the differences between bright and dark regions of the image. MATLAB provides various contrast enhancement techniques, but in this article, we will confine our focus to understand the balance contrast enhancement technique, and will see its implementation in MATLAB programming. What is Balance Contrast Enhancement? In MATLAB, the balance contrast enhancement technique is a modern method to improve the contrast ratio ... Read More

Automatically Plot Different Color Lines in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 11:11:02

313 Views

The different color lines in a plot allows us to plot and distinguish multiple data sets on a same plot area. MATLAB provides various built-in functions to assign different colors to different plot lines automatically. To automatically control the color of plot lines, we can use the following two MATLAB functions: Automatically Plot Different Color Lines using Hold Option In MATLAB programming, we can use the “hold” option to automatically plot different color lines. Syntax hold on; The following MATLAB program explain the use of “hold” function to plot lines of different color. Example % ... Read More

Automatically Maximize an Image in MATLAB

Manish Kumar Saini
Updated on 18-Jul-2023 10:14:12

90 Views

MATLAB programming allows us to automatically maximize an image for better visibility. For this, we can use the “figure” function with some arguments which described in the following syntax. Syntax figure('units', 'normalized', 'outerposition', [0 0 1 1]); The “figure” command with all these parameters automatically maximizes an image. The following MATLAB program demonstrates the implementation of a code to automatically maximize an image. MATLAB Program Example % MATLAB program for automatically maximize an image % Read the input image img = imread('https://www.tutorialspoint.com/assets/questions/media/ 14304-1687425236.jpg'); % Replace 'your_image.jpg' with the path to your image % Display the original image in ... Read More

Advertisements