## Knight’s Tour | Matlab Examples

Matlab Tutorials | Examples Practice 14: Knight’s Tour (Advance) One of the interesting puzzles for chess buffs is the Knight’s Tour problem, which is attributed to the famous mathematician Euler. The question is this: Can the chess piece called the knight move around an empty…

## Number of rectangles from unit squares | Matlab Examples

Matlab Tutorials | Examples Practice 13: Number of rectangles from unit squares Assume you are given an m×n rectangle of unit squares. Within this rectangle, many rectangles and squares can be formed by joining the unit squares. Consider the 2×3 rectangle below. There are 18…

## Plotting: Concentrations, curve fitting, 3D Gaussian plot | Matlab Examples

Matlab Tutorials | Examples Practice 12: Plotting: Concentrations, curve fitting, 3D Gaussian plot Create the three plot windows detailed below using the data in the file practice12data.mat. Your plots should match the provided sample outputs. Pay attention to titles, x-y labels, grids, legends and their…

## Files: Periodic Table – Electron Configurations | Matlab Examples

Matlab Tutorials | Examples Practice 11: Files: Periodic Table – Electron Configurations You are given a file named “PeriodicTable.txt”. The format of the file is as follows: The third column of this file, electron configuration, gives the arrangement of the electrons in various atomic orbitals…

## Files: Amino acid bonds | Matlab Examples

Matlab Tutorials | Examples Practice 10: Files: Amino acid bonds Proteins are made up of amino acids. Every amino acid has one amino group (N), one carboxyl group (C) and one chiral carbon (Cα or CA). The angle between CA-C is called “psi” (ψ) and…

## Formatted output & structures: Stars and their planets | Matlab Examples

Matlab Tutorials | Examples Practice 9: Formatted output & structures: Stars and their planets MAT files are used for saving MATLAB variables for later use, or for transferring them between computers. You can save your variables into a MAT file by giving the save command….

## Functions: Dealing with a triangle | Matlab Examples

Matlab Tutorials | Examples Practice 8: Functions: Dealing with a triangle The side lengths of a triangle always satisfy the following conditions: a < b+c b < a+c c < a+b Function get_abc Write a function named get_abc that gets three positive integers inputs (a,…

## Arrays-matrices: Island area and perimeter | Matlab Examples

Matlab Tutorials | Examples Practice 7: Arrays-matrices: Island area and perimeter The above figure illustrates an example of a 2D grid map of an island, where land is shown in green and the surrounding sea is shown in blue. This grid map can be represented…