Study Guides (390,000)
CA (150,000)
York (10,000)
ITEC (100)

ITEC 2600 Study Guide - Quiz Guide: Pie Chart, MatlabExam

Information Technology
Course Code
ITEC 2600
Xiaofeng Zhou
Study Guide

This preview shows half of the first page. to view the full 1 pages of the document.
ITEC2600 in-Class Exercises X.Zhou York University
ITEC 2600
Introduction to Analytical Programming
Lab Exercise 3
1. Redo all examples from the lecture.
2. Random numbers(vector).
(a) Generate a 1-by-5 vector v1 and 5-by-1 vector v2 whose elements are random numbers.
(b) Generate a 6-by-10 matrix mat whose elements are random integers ranging from 1 to 99, using
built-in function rand and randi separately.
(c) Save work space to a MATLAB data file, then clear work space.
(d) Load the saved data file into work space, then display v1, v2 and mat.
3. Random numbers(matrix).
(a) Generate a 1000-by-10 matrix data whose elements are random numbers ranging from 20 to 100.
Save data to an ASCII data file and Excel data file, then clear data in the work space.
(b) Read the saved Excel data file to data.
(c) Find the maximum number in each row and each column of data. Find the minimum number in
each row and each column of data.
4. Modify your program in question 3 such that the random number generated can be repeatable.
5. Redo the Grades example. Assign the grade letter to each student following the evaluation scheme of
Read the students information into MATLAB using built-in function readmatrix.
Re-Calculate the students nal mark by anonymous function.
Calculate the percentage for each grade level, draw pie chart.
Redo the Grades example using switch.
You're Reading a Preview

Unlock to view full version