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…

# Month: November 2018

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

## Loops: Fibonacci Greatest Common Divisors | Matlab Examples

Matlab Tutorials | Examples Practice 6: Loops: Fibonacci Greatest Common Divisors The Fibonacci numbers are Nature’s numbering system. Given the first two Fibonacci numbers, f0=0 and f1=1, all remaining Fibonacci numbers can be derived iteratively by making use of the following formula: f(n)= f(n-1) +…

## Prime pairs that yield primes | Matlab Examples

Matlab Tutorials | Examples Practice 5: Prime pairs that yield primes A prime number is a number that can be divided without remainder only to 1 and itself. You can find out that a number p is prime by dividing it by all numbers between…

## Pairs that have common divisors | Matlab Examples

Matlab Tutorials | Examples Practice 4: Pairs that have common divisors Write a MATLAB program that does the following jobs: Get two whole numbers (a and b) greater than 1. If any of the numbers do not satisfy the criteria, display a warning message and…