Sorting and curve fitting in matlab, MATLAB Programming

Goal: Learn how to do statistics, sorting and curve fitting in Matlab. Put all of those ".m" files in a folder called yourname_lab7, and zip the folder and submit it on the class website.

Write a script called "yourname_lab7_1.m" that will do the following. Create two vectors with 20 random integers in each; in one the integers should range from 1 to 5, and in the other from 1 to 500. Would you expect the mean and median to be approximately the same? Would you expect the standard deviation of the two vectors to be approximately the same? Answer these questions in the comments of your program, and then use the built-in functions to find and print out the minimum, maximum, mean, median, standard deviation, and mode of each. Draw a histogram for each vector in a subplot. Run the script a few times to see the variations.

Sort DNA sequences

DNA is a double-stranded helical polymer that contains basic genetic information in the form of patterns of nucleotide bases. The patterns of the base molecules A, T, C, and G encode the genetic information.

From the course web page download the file "seq.txt", in which each line contains a short DNA sequence. In your script "yourname_lab7_2.m", Import the data into a cell array using the command
seqs = importdata('seq.txt');

1) Sort these sequences alphabetically.

2) Some DNA sequences are duplicated in the list. Find the most frequent sequence and the number of times it appears in the list. Output your answer nicely using the fprintf function.

Posted Date: 3/13/2013 5:18:10 AM | Location : United States







Related Discussions:- Sorting and curve fitting in matlab, Assignment Help, Ask Question on Sorting and curve fitting in matlab, Get Answer, Expert's Help, Sorting and curve fitting in matlab Discussions

Write discussion on Sorting and curve fitting in matlab
Your posts are moderated
Related Questions
Illustration of Output statements: For illustration, >> disp('Hello') Hello >> disp(4^3)   64 The formatted output can be printed to the screen by using the fpr

Digging the Dirt: Autonomous Mining Robots   Mining is a multi-billion dollar industry and a critical part of the Australian economy. Much of the day-to-day work on mining sites

Illustration of Input function: For illustration, >> rad = input('Enter the radius: ') Enter the radius: 5 rad = 5 If character or string input is preferred, 's' s

what equation equals 36

An electric overhead traveling crane, consisting of a girder, trolley, and wire rope, is shown in figure. The girder has a flexural rigidity (EI) of 6x10 12 lb.in 2 and a span (L

First order differential equations: Euler's method Finally, we consider ?nding the numerical solution for a ?rst order differential equation given an initial value. We consider

Creating Matrix Variables: Creating a matrix variable is actually just a generalization of creating a row and column vector variables. That is, the values within the row are s


Introduction to Matlab: The MATLAB is a graphical and mathematical software package; it has graphical, numerical and programming capabilities. It has built-in functions to do

I am trying to implement this equation u_t=-\u_x\ using upwind scheme. and as a second step, I need to put some stopping function g(h) where u_t=-g(h)\u_x\ how can I write this on