Found 34494 Articles for Programming

Check if given String is K-periodic for all K in range [1, N]

Thanweera Nourin A V
Updated on 30-Oct-2023 15:14:19

138 Views

The aim of this article is to implement a program to check if a given String is K-periodic for all K in range [1, N]. The aim is to determine whether the supplied string is K-periodic provided the string s and the integer K. If a string repeats the sub-string str[0... k-1], it is said to be k-periodic; for example, the string "ababab" is 2 periods long. Print Yes if the supplied string is k-periodic; otherwise, print No. If a character string can be created by concatenating at least one repeats from another string of length k, it is said ... Read More

C++ Program to Find Lexicographically minimum string rotation

Thanweera Nourin A V
Updated on 30-Oct-2023 15:54:20

83 Views

The aim of this article is to implement a C++ Program to Find Lexicographically minimum string rotation. Coming on to the definition of string, a string is a group of characters that ends with the null character "0" in C programming. Characters from the C String are kept in a character array. A C string differs from a character array in that it ends with the distinctive character "\0." Finding the rotation of a string that has the lowest lexicographical order among all feasible rotations is known to be the lexicographically minimal string rotation as well as lexicographically smallest circular ... Read More

What is Electrical Conductivity? – Principle, Formula and Applications

Manish Kumar Saini
Updated on 26-Oct-2023 13:16:00

555 Views

Electrical Conductivity is an important term used in electrical engineering to understand the behavior of a material and electric current flowing through it. Electric conductivity is the property of a material that provides ease in the flow of electric current through the material. Read this article to get a detailed understanding of "electric conductivity", from its definition to principle and its applications. Let us start with the basic definition of electrical conductivity. What is Electrical Conductivity? Electrical conductivity is defined as the property that provides ease in the flow of electric current (movement of electrons) through a material. Electrical conductivity ... Read More

Swapping Two Elements in Each Row of a Matrix Without Loop in MATLAB

Manish Kumar Saini
Updated on 26-Oct-2023 13:15:13

78 Views

Read this tutorial to learn the method of swapping two elements in each row of a matrix without using loop in MATLAB. MATLAB is a powerful to manipulate matrices. We can perform various operations on matrices using MATLAB. In MATLAB, we can swap any two elements in each row of a matrix using the "matrix indexing method". This method of swapping two elements in rows of a matrix is explained below with the help of an example. How to Swap Two Elements in Each Row of Matrix without using Loop In MATLAB, we can use the matrix indexing to swap ... Read More

Root Mean Square Error (RMSE) in MATLAB

Manish Kumar Saini
Updated on 26-Oct-2023 13:14:16

322 Views

Root Mean Square Error (RMSE) is an error estimation technique used to calculate the difference between estimated values and actual values. This method provides the average value of errors as a single value. We can use MATLAB to calculate the root mean square error. For this, MATLAB provides various built-in functions. In this tutorial, I will explain how to calculate the Root Mean Square Error (RMSE) in MATLAB. What is Root Mean Square Error (RMSE)? The root mean square error (RMSE) is a method of measuring error or accuracy of a predictive tool or model. It is calculated by finding ... Read More

Reduced Row Echelon Form (rref) Matrix in MATLAB

Manish Kumar Saini
Updated on 26-Oct-2023 13:10:04

130 Views

Reduced row echelon form (rref) matrix is a simplified matrix used to solve a system of linear equations. MATLAB provides some built-in functions to find the reduced row echelon form matrix of a given matrix. Read this article to learn these methods of finding the reduced row echelon form matrix of a given matrix using MATLAB. Before that let’s get an overview of rref matrix and its properties. What is a Reduced Row Echelon Form Matrix? In linear algebra, the reduced row echelon form matrix, also known as rref matrix, is a special and simplified matrix used to solve systems ... Read More

Page-wise matrix multiplication in MATLAB

Manish Kumar Saini
Updated on 26-Oct-2023 13:07:18

99 Views

When we multiply two N-dimensional matrices along each dimension or page of the two matrices, then it is called page-wise matrix multiplication. Page-wise matrix multiplication is mainly performed in the case of 3-dimensional matrices. Go through this tutorial to learn the methods of performing page-wise matrix multiplication using MATLAB. What is Page-Wise Matrix Multiplication? When two N-dimensional matrices are multiplied along each dimension of the two matrices, then this type of matrix multiplication is called the page-wise matrix multiplication. It is basically the element wise multiplication of two 3D matrices along a specific dimension or page in a 3D matrix. ... Read More

Polar Axes Appearance and Behavior in MATLAB

Manish Kumar Saini
Updated on 25-Oct-2023 15:23:29

43 Views

In data visualization, the polar axes are used to represent data in polar coordinates. Polar axes provide a way of visualizing complex data in the form of polar plots. Read this article to learn the methods of changing the properties of polar axes to control their appearance and behavior. Before learning to customize the appearance and behavior of polar axes, let us see how to create a polar axes and polar plot in MATLAB. How to Create Polar Axes in MATLAB? In MATLAB, there is a built-in function named "polaraxes" used to create polar axes in MATLAB figures. Its syntax ... Read More

Overloading Functions in Class Definitions in MATLAB

Manish Kumar Saini
Updated on 25-Oct-2023 15:17:09

136 Views

In MATLAB, when we define multiple methods or functions with the same name but a list of different input arguments in a class, it is known as function overloading. In MATLAB programming, the function overloading is a part of polymorphism. Where, the concept of polymorphism says that a single function can behave differently depending on the nature or type of input arguments provided. This article is primarily meant for explaining the concept of function overloading in class definitions in MATLAB programming. But before that let us learn a bit about overloading functions in class definitions in MATLAB. What is Overloading ... Read More

Nearest-Neighbor Interpolation Algorithm in MATLAB

Manish Kumar Saini
Updated on 25-Oct-2023 15:16:01

334 Views

Nearest-neighbor interpolation algorithm is a simple interpolation method used to interpolate unknown values between data points. We can implement this algorithm in MATLAB programming. Read this article to learn how to implement the nearest-neighbor interpolation algorithm in MATLAB. Let us start our discussion with the basics of nearest-neighbor interpolation algorithm. What is Nearest-Neighbor Interpolation Algorithm? The nearest-neighbor interpolation algorithm is a simple method to estimate the unknown values between discrete data points. This algorithm is quite useful in various fields of engineering like image processing, signal processing, etc. The principle behind this algorithm is very simple, that is, it assigns ... Read More

Advertisements