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
coding of sep protocol

Make a vector of 500 random numbers from a normal distribution with mean 2 and standard deviation 5(randn). a After you generate the vector, verify that the sample mean and stan

Algorithms: Before writing any computer program, it is very useful to first outline the steps which will be essential. An algorithm is the series of steps required to solve a


The Efficient Method: Though, in MATLAB, there is another built-in function which specifically produces random integers, i.e. randint. Calling the function with randint (1,1,n

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

The characteristic properties of an aquifer can be used to calculate groundwater velocities, v groundwater (L/T), according to: where KH (L/T) is the hydraulic conductivit

The pressure radiated by a column of in-phase monopole sources may be expressed as: Create a model (spreadsheet / MATLAB etc) for a 6 element column, where d=0.2m . Figure

function y=tps(r) % This is the thin-plate spline if r  y=0; else  y=r^2*log(r); end function y=fun(point) % my target function x=point(1); z=point(2); y=7-4*x^2+z^3;

Savannah says that the least common multiple of 4 and 6 is 24. Is she right or what is her mistake?