Posts

Caesar: A MATLAB function for encryption and decryption of strings.

Image
 Caesar Encryption and Decryption  of strings in MATLAB Description This MATLAB function named "caesar", I wrote for an assignment of an online course of Vanderbilt University via Coursera. The function takes two inputs, namely feed and shift. and gives output as coded feed: a string to be encrypted or an already encrypted string to be decrypted Shift: a value to encrypt or decrypt the string Remember that when we decrypt the string, we place an opposite sign before the shift ( if the shift is 45 then make it -45 or vice versa) Algorithm Feed is converted to double ( data type) a copy of the feed is created divide the shift by 95 and take the remainder a for loop is created to the length of the feed if the sum of character and shift is greater than 126 then the value above 126 is added to 31 and is saved as the new character in place of the original one. if the sum of character and shift is less than 32 then character, shift, and 127 are added together and 32 is subtracted ...

Exploratory Data Analysis of Damages in Hurricane Harvey (2017 USA) with MATLAB

Image
Exploratory Data Analysis with MATLAB  Hurricane Harvey Hurricane Harvey was a devastating Category 4 hurricane that made landfall on Texas and Louisiana in August 2017 , causing catastrophic flooding and more than 100 deaths. It is tied with 2005's Hurricane Katrina as the costliest tropical cyclone on record, inflicting $125 billion (2017 USD) in damage, primarily from catastrophic rainfall-triggered flooding in the Houston metropolitan area and Southeast Texas; This made the storm the costliest natural disaster recorded in Texas at the time. It was the first major hurricane to make landfall in the United States since Wilma in 2005, ending a record 12-year span in which no hurricanes made landfall at the intensity of a major hurricane throughout the country. In four days, many areas received more than 40 inches (1,000 mm) of rain as the system slowly meandered over eastern Texas and adjacent waters, causing unprecedented flooding. With peak accumulations of 60.58 in (1,539 mm...

Balanced Histogram Thresholding with MATLAB. Basic Concept & programming

Image
Balanced Histogram Thresholding in MATLAB Basic Concept The main idea is to  find  the point of the image histogram to balance, the unbalanced histogram of the image. In this method, the image is divided into two main parts, background, and foreground. The method finds the point in the histogram where both parts (background & foreground) are balanced. The Algorithm we determine the start and endpoints in the Histogram of the image From these two points, we calculate the midpoint to divide the histogram into the left side & the right side we calculate the weights or sum of both parts ( left side & right side) of the histogram we compare the sums of both parts remove the farthest point (weight) from the heavier side or part adjust the midpoint recalculate the sums of the left & right side compare the weights we repeat this procedure until the sums or starting and endpoints become equal or the same on both sides. The process as shown in a GIF from  Wikipedia ...