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

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…