Ace My Grades
Sign In
Sign In
Reset Password
Register
  • Home
  • Tutorials
    • Accounting
    • Business
    • Law
    • Finance
    • Health Care
    • Management
    • Science
    • Political Science
    • Computer Science
  • My Account
  • Contact Us
$22.00 $15.00
Cell arrays and structure | Complete Solution
William Thompson
1

Description

Cell arrays and structure

The amino acids are important in protein building. These acids contain molecules of oxygen (O), carbon (C), nitrogen (N), sulfur (S), and hydrogen (H).

In exercises 1-4 you will use cell arrays and structure arrays to store data about atom weights and the formula of amino acids. The overall task will be to create the array data in matlab and write a function that uses this data to calculate the molecular weight of any amino acid. The easiest way to approach this is to break up the task into smaller tasks and write a function for each.

The first function you need to write will create a cell array and structure array and populate them with data about the element weights and amino acid formulae. Use the function header:

function [w s] = generate_array()

 

This function has no inputs. There are two outputs; w is the cell array of element weights and s is the structure array of amino acids.

The following table lists the relevant elements and their molecular weights in Daltons:

Element

Weight

Oxygen

15.9994

Carbon

12.011

Nitrogen

14.00674

Sulfur

32.066

Hydrogen

1.00794

In your function, create a cell array w that stores the molecular weight of each atom, with atom names in the first column and corresponding weights in the second.

The table below shows the chemical formula of 4 amino acids:

Amino acid

Chemical formula

Isoleucine

C6H13NO2

Lysine

C6H14N2O2

Methionine

C5H11NO2S

Phenylalanine

C9H11NO2

In your function, create a structure array s, that stores the formulation of each Amino Acid. Each element of the array should be a structure with 6 variables, one for the amino acid’s name and one that stores the number of each atom that exist in the amino acid’s formula.

Test your function. Try the follow example commands and see if you get the same results (your variable names may be different):

>> [w s] = generate_array(); >> s(1).name     Isoleucine >> s(1).c     6 >> s(1).s     0 >> w{3,1}     Nitrogen

Copy and paste your function code into the textbox

 

Take This Course $22.00 $15.00

Lessons

Cell arrays and structure | Complete Solution

Take a course to view this content

Related Courses

$25.00 $18.00
CIS 333 | Lab 5 Answers | Complete Solution | Rated A+
William Thompson
3
$25.00 $18.00
CIS 333 | Lab 4 Answers | Complete Solution | Rated A+
William Thompson
3
$25.00 $18.00
CIS 333 | Lab 2 Answers | Complete Solution | Rated A+
William Thompson
4
$30.00 $21.00
CIS 333 | Week 8 Assignment 2 – Identifying Potential Risk, Response and Recovery | Complete Solution | Rated A+
William Thompson
5
Ace My Grades © 2021
  • Home
  • Checkout
  • Blog
  • Privacy Policy
  • Contact Us
  • FAQ