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…

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…

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,…